diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2008-01-24 22:49:47 +0000 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2008-01-24 22:49:47 +0000 |
commit | b5c8a34aeff244ffe7a9f4bd5edf827495d0deea (patch) | |
tree | 150af59ea988a4d63e9b9a080db224ffcd84ffab /protocols/jabber/io.c | |
parent | 613cc5583465b2fa35288a2f28d0e408904c4fd9 (diff) |
Keeping track of valid Jabber connections so _connected() events will be
ignored if the connection's dead already. Necessary if using GLib for event
handling for now. :-/
Diffstat (limited to 'protocols/jabber/io.c')
-rw-r--r-- | protocols/jabber/io.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/protocols/jabber/io.c b/protocols/jabber/io.c index 29561b86..86c216ef 100644 --- a/protocols/jabber/io.c +++ b/protocols/jabber/io.c @@ -248,6 +248,9 @@ gboolean jabber_connected_plain( gpointer data, gint source, b_input_condition c { struct im_connection *ic = data; + if( g_slist_find( jabber_connections, ic ) == NULL ) + return FALSE; + if( source == -1 ) { imcb_error( ic, "Could not connect to server" ); @@ -263,7 +266,12 @@ gboolean jabber_connected_plain( gpointer data, gint source, b_input_condition c gboolean jabber_connected_ssl( gpointer data, void *source, b_input_condition cond ) { struct im_connection *ic = data; - struct jabber_data *jd = ic->proto_data; + struct jabber_data *jd; + + if( g_slist_find( jabber_connections, ic ) == NULL ) + return FALSE; + + jd = ic->proto_data; if( source == NULL ) { |