Ignore:
Timestamp:
2008-01-24T22:49:47Z (17 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
764c7d1, f774e01
Parents:
613cc55
Message:

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. :-/

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/jabber.c

    r613cc55 rb5c8a34  
    3535#include "base64.h"
    3636
     37GSList *jabber_connections;
     38
    3739static void jabber_init( account_t *acc )
    3840{
     
    7072        struct ns_srv_reply *srv = NULL;
    7173        char *connect_to, *s;
     74       
     75        /* For now this is needed in the _connected() handlers if using
     76           GLib event handling, to make sure we're not handling events
     77           on dead connections. */
     78        jabber_connections = g_slist_prepend( jabber_connections, ic );
    7279       
    7380        jd->ic = ic;
     
    263270        g_free( jd->username );
    264271        g_free( jd );
     272       
     273        jabber_connections = g_slist_remove( jabber_connections, ic );
    265274}
    266275
Note: See TracChangeset for help on using the changeset viewer.