* XMPP login hooks which output protocol data should only activate if this is actuall...
authorArt Cancro <ajc@citadel.org>
Wed, 5 May 2010 16:14:01 +0000 (16:14 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 5 May 2010 16:14:01 +0000 (16:14 +0000)
citadel/modules/xmpp/serv_xmpp.c

index a4a5f28ecc6375e84f32b17b7ee693a08e6824bf..067faa0a1997ba915c5b5c6440d3f40c127cfb39 100644 (file)
@@ -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();
+       }
 }