From bd9b00f4fed3560eab98f15cf9923aed13467d5d Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Thu, 19 Jan 2006 18:07:47 +0100 Subject: Fixes for single-process daemon mode, changed value of USTATUS_SHUTDOWN. If this still causes problems, shutting down should be an extra flag instead of a status code. --- irc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'irc.c') diff --git a/irc.c b/irc.c index aedbbc83..2f2937cc 100644 --- a/irc.c +++ b/irc.c @@ -187,6 +187,8 @@ void irc_free(irc_t * irc) if( storage_save( irc, TRUE ) != STORAGE_OK ) irc_usermsg( irc, "Error while saving settings!" ); + closesocket( irc->fd ); + if( irc->ping_source_id > 0 ) g_source_remove( irc->ping_source_id ); g_source_remove( irc->r_watch_source_id ); @@ -693,7 +695,7 @@ void irc_login( irc_t *irc ) irc_usermsg( irc, "Welcome to the BitlBee gateway!\n\nIf you've never used BitlBee before, please do read the help information using the \x02help\x02 command. Lots of FAQ's are answered there." ); - if( global.conf->runmode == RUNMODE_FORKDAEMON ) + if( global.conf->runmode == RUNMODE_FORKDAEMON || global.conf->runmode == RUNMODE_DAEMON ) ipc_to_master_str( "CLIENT %s %s :%s\r\n", irc->host, irc->nick, irc->realname ); irc->status = USTATUS_LOGGED_IN; -- cgit v1.2.3