diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2006-01-22 10:19:03 +0100 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2006-01-22 10:19:03 +0100 | 
| commit | 57c4fc067a4a43cebee74e9d6076eb538986d5cc (patch) | |
| tree | 96d4e5cb313825c10409a0debebbfe129fa800bf /bitlbee.c | |
| parent | 54879ab3b2cbcaf1c9114bddd85ec5d4dc097915 (diff) | |
| parent | 87de505f3203054a2a0becbea5a064d24ab2cde3 (diff) | |
Error checking for accept(). Have to find out why it went wrong (and fork()ed a bit too much) last night.
Diffstat (limited to 'bitlbee.c')
| -rw-r--r-- | bitlbee.c | 6 | 
1 files changed, 6 insertions, 0 deletions
| @@ -238,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]; | 
