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.
--- 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);