aboutsummaryrefslogtreecommitdiffstats
path: root/bitlbee.c
diff options
context:
space:
mode:
Diffstat (limited to 'bitlbee.c')
-rw-r--r--bitlbee.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/bitlbee.c b/bitlbee.c
index 9a4688d8..5da5d6e1 100644
--- a/bitlbee.c
+++ b/bitlbee.c
@@ -110,6 +110,9 @@ int bitlbee_daemon_init()
}
#endif
+ if( global.conf->runmode == RUNMODE_FORKDAEMON )
+ ipc_master_load_state();
+
return( 0 );
}
@@ -235,6 +238,12 @@ gboolean bitlbee_io_new_client( GIOChannel *source, GIOCondition condition, gpoi
int new_socket = accept( global.listen_socket, (struct sockaddr *) &conn_info, &size );
pid_t client_pid = 0;
+ if( new_socket == -1 )
+ {
+ log_message( LOGLVL_WARNING, "Could not accept new connection: %s", strerror( errno ) );
+ return TRUE;
+ }
+
if( global.conf->runmode == RUNMODE_FORKDAEMON )
{
int fds[2];