diff options
Diffstat (limited to 'protocols/jabber/jabber.c')
-rw-r--r-- | protocols/jabber/jabber.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/protocols/jabber/jabber.c b/protocols/jabber/jabber.c index 264a0308..243ed7fd 100644 --- a/protocols/jabber/jabber.c +++ b/protocols/jabber/jabber.c @@ -34,6 +34,8 @@ #include "md5.h" #include "base64.h" +GSList *jabber_connections; + static void jabber_init( account_t *acc ) { set_t *s; @@ -70,6 +72,11 @@ static void jabber_login( account_t *acc ) struct ns_srv_reply *srv = NULL; char *connect_to, *s; + /* For now this is needed in the _connected() handlers if using + GLib event handling, to make sure we're not handling events + on dead connections. */ + jabber_connections = g_slist_prepend( jabber_connections, ic ); + jd->ic = ic; ic->proto_data = jd; @@ -262,6 +269,8 @@ static void jabber_logout( struct im_connection *ic ) g_free( jd->away_message ); g_free( jd->username ); g_free( jd ); + + jabber_connections = g_slist_remove( jabber_connections, ic ); } static int jabber_buddy_msg( struct im_connection *ic, char *who, char *message, int flags ) |