diff options
Diffstat (limited to 'protocols')
| -rw-r--r-- | protocols/events.h | 1 | ||||
| -rw-r--r-- | protocols/events_glib.c | 5 | ||||
| -rw-r--r-- | protocols/events_libevent.c | 11 | ||||
| -rw-r--r-- | protocols/nogaim.c | 10 | ||||
| -rw-r--r-- | protocols/yahoo/yahoo.c | 10 | 
5 files changed, 11 insertions, 26 deletions
| diff --git a/protocols/events.h b/protocols/events.h index fc733bec..781fca6a 100644 --- a/protocols/events.h +++ b/protocols/events.h @@ -58,7 +58,6 @@ G_MODULE_EXPORT void b_main_quit();  G_MODULE_EXPORT gint b_input_add(int fd, b_input_condition cond, b_event_handler func, gpointer data);  G_MODULE_EXPORT gint b_timeout_add(gint timeout, b_event_handler func, gpointer data);  G_MODULE_EXPORT void b_event_remove(gint id); -G_MODULE_EXPORT gboolean b_event_remove_by_data(gpointer data);  #ifdef EVENTS_LIBEVENT  G_MODULE_EXPORT void closesocket(int fd); diff --git a/protocols/events_glib.c b/protocols/events_glib.c index ff6e5a74..620720cd 100644 --- a/protocols/events_glib.c +++ b/protocols/events_glib.c @@ -135,8 +135,3 @@ void b_event_remove(gint tag)  	if (tag > 0)  		g_source_remove(tag);  } - -gboolean b_event_remove_by_data(gpointer data) -{ -	return g_source_remove_by_user_data(data); -} diff --git a/protocols/events_libevent.c b/protocols/events_libevent.c index 67f973b9..3328f68b 100644 --- a/protocols/events_libevent.c +++ b/protocols/events_libevent.c @@ -211,13 +211,6 @@ void b_event_remove( gint id )  	}  } -gboolean b_event_remove_by_data( gpointer data ) -{ -	/* FIXME! */ -	event_debug( "FALSE!\n" ); -	return FALSE; -} -  void closesocket( int fd )  {  	struct b_event_data *b_ev; @@ -228,12 +221,12 @@ void closesocket( int fd )  	   get a little bit messed up. So this little function will remove the handlers  	   properly before closing a socket. */ -	if( b_ev = g_hash_table_lookup( read_hash, &fd ) ) +	if( ( b_ev = g_hash_table_lookup( read_hash, &fd ) ) )  	{  		event_debug( "Warning: fd %d still had a read event handler when shutting down.\n", fd );  		b_event_remove( b_ev->id );  	} -	if( b_ev = g_hash_table_lookup( write_hash, &fd ) ) +	if( ( b_ev = g_hash_table_lookup( write_hash, &fd ) ) )  	{  		event_debug( "Warning: fd %d still had a write event handler when shutting down.\n", fd );  		b_event_remove( b_ev->id ); diff --git a/protocols/nogaim.c b/protocols/nogaim.c index c3d810a3..06b629a5 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -247,7 +247,7 @@ struct gaim_connection *new_gaim_conn( struct aim_user *user )  	/* [MD]	BUGFIX: don't set gc->irc to the global IRC, but use the one from the struct aim_user.  	 * This fixes daemon mode breakage where IRC doesn't point to the currently active connection.  	 */ -	gc->irc=user->irc; +	gc->irc = user->irc;  	connections = g_slist_append( connections, gc ); @@ -371,7 +371,8 @@ gboolean auto_reconnect( gpointer data, gint fd, b_input_condition cond )  void cancel_auto_reconnect( account_t *a )  { -	while( b_event_remove_by_data( (gpointer) a ) ); +	/* while( b_event_remove_by_data( (gpointer) a ) ); */ +	b_event_remove( a->reconnect );  	a->reconnect = 0;  } @@ -413,10 +414,9 @@ void signoff( struct gaim_connection *gc )  	else if( !gc->wants_to_die && set_getint( irc, "auto_reconnect" ) )  	{  		int delay = set_getint( irc, "auto_reconnect_delay" ); -		serv_got_crap( gc, "Reconnecting in %d seconds..", delay ); -		a->reconnect = 1; -		b_timeout_add( delay * 1000, auto_reconnect, a ); +		serv_got_crap( gc, "Reconnecting in %d seconds..", delay ); +		a->reconnect = b_timeout_add( delay * 1000, auto_reconnect, a );  	}  	destroy_gaim_conn( gc ); diff --git a/protocols/yahoo/yahoo.c b/protocols/yahoo/yahoo.c index 1ce860eb..fba5dfb8 100644 --- a/protocols/yahoo/yahoo.c +++ b/protocols/yahoo/yahoo.c @@ -469,13 +469,12 @@ gboolean byahoo_read_ready_callback( gpointer data, gint source, b_input_conditi  	struct byahoo_read_ready_data *d = data;  	if( !byahoo_get_gc_by_id( d->id ) ) -	{  		/* WTF doesn't libyahoo clean this up? */ -		ext_yahoo_remove_handler( d->id, d->tag );  		return FALSE; -	}  	yahoo_read_ready( d->id, d->fd, d->data ); +	 +	return TRUE;  }  struct byahoo_write_ready_data @@ -491,13 +490,12 @@ gboolean byahoo_write_ready_callback( gpointer data, gint source, b_input_condit  	struct byahoo_write_ready_data *d = data;  	if( !byahoo_get_gc_by_id( d->id ) ) -	{  		/* WTF doesn't libyahoo clean this up? */ -		ext_yahoo_remove_handler( d->id, d->tag );  		return FALSE; -	}  	yahoo_write_ready( d->id, d->fd, d->data ); +	 +	return FALSE;  }  void ext_yahoo_login_response( int id, int succ, char *url ) | 
