diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-07-24 23:16:18 +0200 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-07-24 23:16:18 +0200 |
commit | 2945c6ff5d1848f6d8e51a0d804a2d769e6894a7 (patch) | |
tree | 595788105189dab5270fe2b7dc4e9baffa487aed /bitlbee.c | |
parent | ef14a83adbb9036c0006ad460c5e11882a3d7e13 (diff) | |
parent | 593971d9ff9f246cec5af5583f29e45fee62edfe (diff) |
Merge ui-fix (which includes killerbee (i.e. file transfers and libpurple
support)). ui-fix rewrites the complete IRC core, fixing many things that
were broken/hacky/limited so far.
The list is too long to include here, but http://wiki.bitlbee.org/UiFix
has a summary, as does doc/CHANGES and of course the full revision history.
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(); |