From: Art Cancro Date: Wed, 5 May 2010 16:14:01 +0000 (+0000) Subject: * XMPP login hooks which output protocol data should only activate if this is actuall... X-Git-Tag: v7.86~223 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=cd92e340089d4d768c0c1a02af1dadd7dc19be08 * XMPP login hooks which output protocol data should only activate if this is actually an XMPP session. Ouch. --- diff --git a/citadel/modules/xmpp/serv_xmpp.c b/citadel/modules/xmpp/serv_xmpp.c index a4a5f28ec..067faa0a1 100644 --- a/citadel/modules/xmpp/serv_xmpp.c +++ b/citadel/modules/xmpp/serv_xmpp.c @@ -510,7 +510,11 @@ void xmpp_async_loop(void) { */ void xmpp_login_hook(void) { xmpp_queue_event(XMPP_EVT_LOGIN, CC->cs_inet_email); - xmpp_delete_old_buddies_who_no_longer_exist_from_the_client_roster(); + + /* only do the protocol stuff if this is an XMPP session */ + if (CC->h_command_function == xmpp_command_loop) { + xmpp_delete_old_buddies_who_no_longer_exist_from_the_client_roster(); + } }