]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/jabber/xmpp_queue.c
Jabber now reads the context list safely and it writes it safely too.
[citadel.git] / citadel / modules / jabber / xmpp_queue.c
index 44540496bfc5f5d34903fcea00583d5b1cfe1186..2c97b8431a31fa1f51f966afa123e1adcf25ab72 100644 (file)
@@ -99,11 +99,13 @@ void xmpp_queue_event(int event_type, char *email_addr) {
        end_critical_section(S_XMPP_QUEUE);
 
        /* Tell the sessions that something is happening */
+       begin_critical_section(S_SESSION_TABLE);
        for (cptr = ContextList; cptr != NULL; cptr = cptr->next) {
                if ((cptr->logged_in) && (cptr->h_async_function == xmpp_async_loop)) {
                        cptr->async_waiting = 1;
                }
        }
+       end_critical_section(S_SESSION_TABLE);
 }