# HG changeset patch # User Mikael Berthe # Date 1165759278 -3600 # Node ID 7804dbac3875a6b84311776023b8048430d7755a # Parent b3bfdecfd1786c87e930c0556d7e966da557c65b Fix a potential JEP22/85 issue introduced by changeset 10f9d6fcfeab If the remote client has JEP85 resource, make sure we do not send a JEP22 event. diff -r b3bfdecfd178 -r 7804dbac3875 mcabber/src/jabglue.c --- a/mcabber/src/jabglue.c Sun Dec 10 11:45:52 2006 +0100 +++ b/mcabber/src/jabglue.c Sun Dec 10 15:01:18 2006 +0100 @@ -793,7 +793,7 @@ const char *bjid; #ifdef JEP0085 GSList *resources, *p_res, *p_next; - struct jep0085 *jep85; + struct jep0085 *jep85 = NULL;; #endif #ifdef JEP0022 struct jep0022 *jep22; @@ -822,6 +822,10 @@ g_free(p_res->data); } g_slist_free(resources); + // If the last resource had chatstates support when can return now, + // we don't want to send a JEP22 event. + if (jep85 && jep85->support == CHATSTATES_SUPPORT_OK) + return; #endif #ifdef JEP0022 jep22 = buddy_resource_jep22(buddy, NULL);