diff options
Diffstat (limited to 'bitlbee.c')
| -rw-r--r-- | bitlbee.c | 11 | 
1 files changed, 7 insertions, 4 deletions
| @@ -120,7 +120,7 @@ int bitlbee_daemon_init()  		return( -1 );  	} -	global.listen_watch_source_id = b_input_add( global.listen_socket, GAIM_INPUT_READ, bitlbee_io_new_client, NULL ); +	global.listen_watch_source_id = b_input_add( global.listen_socket, B_EV_IO_READ, bitlbee_io_new_client, NULL );  #ifndef _WIN32  	if( !global.conf->nofork ) @@ -317,10 +317,12 @@ static gboolean bitlbee_io_new_client( gpointer data, gint fd, b_input_condition  		{  			struct bitlbee_child *child; +			/* TODO: Stuff like this belongs in ipc.c. */  			child = g_new0( struct bitlbee_child, 1 );  			child->pid = client_pid;  			child->ipc_fd = fds[0]; -			child->ipc_inpa = b_input_add( child->ipc_fd, GAIM_INPUT_READ, ipc_master_read, child ); +			child->ipc_inpa = b_input_add( child->ipc_fd, B_EV_IO_READ, ipc_master_read, child ); +			child->to_fd = -1;  			child_list = g_slist_append( child_list, child );  			log_message( LOGLVL_INFO, "Creating new subprocess with pid %d.", (int) client_pid ); @@ -348,7 +350,7 @@ static gboolean bitlbee_io_new_client( gpointer data, gint fd, b_input_condition  			/* We can store the IPC fd there now. */  			global.listen_socket = fds[1]; -			global.listen_watch_source_id = b_input_add( fds[1], GAIM_INPUT_READ, ipc_child_read, irc ); +			global.listen_watch_source_id = b_input_add( fds[1], B_EV_IO_READ, ipc_child_read, irc );  			close( fds[0] ); @@ -369,7 +371,8 @@ gboolean bitlbee_shutdown( gpointer data, gint fd, b_input_condition cond )  {  	/* Try to save data for all active connections (if desired). */  	while( irc_connection_list != NULL ) -		irc_free( irc_connection_list->data ); +		irc_abort( irc_connection_list->data, FALSE, +		           "BitlBee server shutting down" );  	/* We'll only reach this point when not running in inetd mode: */  	b_main_quit(); | 
