cpw.darkrain42.xmpp.bosh: 561d170a: Fix up the propagate

paul at darkrain42.org paul at darkrain42.org
Sun Apr 5 18:07:45 EDT 2009


-----------------------------------------------------------------
Revision: 561d170afd4a1d206da037ef6f036ef9059c794b
Ancestor: bc55ca16b7b5694b0a8dddae6b43aafadca76c66
Author: paul at darkrain42.org
Date: 2009-04-05T21:18:15
Branch: im.pidgin.cpw.darkrain42.xmpp.bosh
URL: http://d.pidgin.im/viewmtn/revision/info/561d170afd4a1d206da037ef6f036ef9059c794b

Modified files:
        libpurple/protocols/jabber/buddy.c
        libpurple/protocols/jabber/caps.c

ChangeLog: 

Fix up the propagate

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/buddy.c	cf4560f1cb3c538276dccc5e402270b5a24a3758
+++ libpurple/protocols/jabber/buddy.c	a26612fa41cb392030ef9e5fb9a785421953bf56
@@ -1847,7 +1847,7 @@ static void jabber_buddy_get_info_for_ji
 		}
 
 		if (jbr->tz_off == PURPLE_NO_TZ_OFF &&
-				(!jbr->caps ||
+				(!jbr->caps.info ||
 				 	jabber_resource_has_capability(jbr, "urn:xmpp:time"))) {
 			xmlnode *child;
 			iq = jabber_iq_new(js, JABBER_IQ_GET);
============================================================
--- libpurple/protocols/jabber/caps.c	eaf3ff2d67be05ea25a3b1ba176023f34eddb3a2
+++ libpurple/protocols/jabber/caps.c	c609d353cad94313609a9b2ab7dc36943f08489d
@@ -417,16 +417,16 @@ static void
 }
 
 static void
-jabber_caps_client_iqcb(JabberStream *js, xmlnode *packet, gpointer data)
+jabber_caps_client_iqcb(JabberStream *js, const char *from, JabberIqType type,
+                        const char *id, xmlnode *packet, gpointer data)
 {
 	xmlnode *query = xmlnode_get_child_with_namespace(packet, "query",
 		"http://jabber.org/protocol/disco#info");
 	jabber_caps_cbplususerdata *userdata = data;
 	JabberCapsClientInfo *info = NULL, *value;
-	const char *type = xmlnode_get_attrib(packet, "type");
 	JabberCapsKey key;
 
-	if (!query || !strcmp(type, "error")) {
+	if (!query || type == JABBER_IQ_ERROR) {
 		/* Any outstanding exts will be dealt with via ref-counting */
 		userdata->cb(NULL, NULL, userdata->cb_data);
 		cbplususerdata_unref(userdata);
@@ -501,17 +501,17 @@ static void
 } ext_iq_data;
 
 static void
-jabber_caps_ext_iqcb(JabberStream *js, xmlnode *packet, gpointer data)
+jabber_caps_ext_iqcb(JabberStream *js, const char *from, JabberIqType type,
+                     const char *id, xmlnode *packet, gpointer data)
 {
 	xmlnode *query = xmlnode_get_child_with_namespace(packet, "query",
 		"http://jabber.org/protocol/disco#info");
 	xmlnode *child;
 	ext_iq_data *userdata = data;
-	const char *type = xmlnode_get_attrib(packet, "type");
 	GList *features = NULL;
 	JabberCapsNodeExts *node_exts;
 
-	if (!query || !strcmp(type, "error")) {
+	if (!query || type == JABBER_IQ_ERROR) {
 		cbplususerdata_unref(userdata->data);
 		g_free(userdata);
 		return;


More information about the Commits mailing list