changeset 7425:85cd2e71bff7

[gaim-migrate @ 8028] syncing my jabber changes, and disabling the half-implemented file sending stuff. I don't want that sneaking into a release. committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Tue, 04 Nov 2003 19:18:38 +0000
parents c8b4a617ee5b
children d3711f98f568
files src/protocols/jabber/auth.c src/protocols/jabber/buddy.c src/protocols/jabber/iq.c src/protocols/jabber/presence.c src/protocols/jabber/roster.c
diffstat 5 files changed, 22 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/jabber/auth.c	Tue Nov 04 01:34:46 2003 +0000
+++ b/src/protocols/jabber/auth.c	Tue Nov 04 19:18:38 2003 +0000
@@ -129,6 +129,8 @@
 	gboolean digest = FALSE;
 	const char *pw = gaim_account_get_password(js->gc->account);
 
+	/* XXX: check for an <iq type='error' /> */
+
 	query = xmlnode_get_child(packet, "query");
 	if(js->stream_id && xmlnode_get_child(query, "digest")) {
 		digest = TRUE;
--- a/src/protocols/jabber/buddy.c	Tue Nov 04 01:34:46 2003 +0000
+++ b/src/protocols/jabber/buddy.c	Tue Nov 04 19:18:38 2003 +0000
@@ -895,25 +895,18 @@
 	struct proto_buddy_menu *pbm;
 	JabberStream *js = gc->proto_data;
 	JabberBuddy *jb = jabber_buddy_find(js, name, TRUE);
-	GList *resources;
-	gboolean has_file_xfer = FALSE;
 
 	if(!jb)
 		return m;
 
-	for(resources = jb->resources; resources; resources = resources->next) {
-		JabberBuddyResource *jbr = resources->data;
-		if(jbr->capabilities & JABBER_CAP_SI_FILE_XFER)
-			has_file_xfer = TRUE;
-	}
+	/* XXX: should check capability once we know we want to send
+	pbm = g_new0(struct proto_buddy_menu, 1);
+	pbm->label = _("Send File");
+	pbm->callback = jabber_buddy_ask_send_file;
+	pbm->gc = gc;
+	m = g_list_append(m, pbm);
 
-	if(has_file_xfer) {
-		pbm = g_new0(struct proto_buddy_menu, 1);
-		pbm->label = _("Send File");
-		pbm->callback = jabber_buddy_ask_send_file;
-		pbm->gc = gc;
-		m = g_list_append(m, pbm);
-	}
+	*/
 
 	pbm = g_new0(struct proto_buddy_menu, 1);
 	if(jb->invisible & JABBER_INVIS_BUDDY) {
--- a/src/protocols/jabber/iq.c	Tue Nov 04 01:34:46 2003 +0000
+++ b/src/protocols/jabber/iq.c	Tue Nov 04 19:18:38 2003 +0000
@@ -254,13 +254,17 @@
 		SUPPORT_FEATURE("jabber:iq:time")
 		SUPPORT_FEATURE("jabber:iq:version")
 		SUPPORT_FEATURE("jabber:x:conference")
+		/*
 		SUPPORT_FEATURE("http://jabber.org/protocol/bytestreams")
+		*/
 		SUPPORT_FEATURE("http://jabber.org/protocol/disco#info")
 		SUPPORT_FEATURE("http://jabber.org/protocol/disco#items")
 		SUPPORT_FEATURE("http://jabber.org/protocol/muc")
 		SUPPORT_FEATURE("http://jabber.org/protocol/muc#user")
+		/*
 		SUPPORT_FEATURE("http://jabber.org/protocol/si")
 		SUPPORT_FEATURE("http://jabber.org/protocol/si/profile/file-transfer")
+		*/
 
 		jabber_iq_send(iq);
 	}else if(!strcmp(type, "result")) {
--- a/src/protocols/jabber/presence.c	Tue Nov 04 01:34:46 2003 +0000
+++ b/src/protocols/jabber/presence.c	Tue Nov 04 19:18:38 2003 +0000
@@ -298,7 +298,6 @@
 		}
 		g_free(room_jid);
 	} else {
-		gboolean newly_online = FALSE;
 		if(state != JABBER_STATE_ERROR && !(jb->subscription & JABBER_SUB_TO)) {
 			gaim_debug(GAIM_DEBUG_INFO, "jabber",
 					"got unexpected presence from %s, ignoring\n", from);
@@ -318,8 +317,6 @@
 				(type && !strcasecmp(type, "unavailable"))) {
 			jabber_buddy_remove_resource(jb, jid->resource);
 		} else {
-			if(!(jbr = jabber_buddy_find_resource(jb, jid->resource)))
-				newly_online = TRUE;
 			jabber_buddy_track_resource(jb, jid->resource, priority, state,
 					status);
 		}
@@ -333,13 +330,6 @@
 		else
 			serv_got_update(js->gc, buddy_name, 0, 0, 0, 0, 0);
 
-		if(newly_online) {
-			JabberIq *iq = jabber_iq_new_query(js, JABBER_IQ_GET,
-					"http://jabber.org/protocol/disco#info");
-			xmlnode_set_attrib(iq->node, "to", from);
-			jabber_iq_send(iq);
-		}
-
 		g_free(buddy_name);
 	}
 	g_free(status);
--- a/src/protocols/jabber/roster.c	Tue Nov 04 01:34:46 2003 +0000
+++ b/src/protocols/jabber/roster.c	Tue Nov 04 19:18:38 2003 +0000
@@ -259,21 +259,26 @@
 {
 	JabberStream *js = gc->proto_data;
 	char *who;
-	GSList *buddies;
+	GSList *groups = NULL;
 	JabberBuddy *jb;
 
 	if(!js->roster_parsed)
 		return;
 
-	who = jabber_get_bare_jid(name);
+	if(!(who = jabber_get_bare_jid(name)))
+		return;
 
-	buddies = gaim_find_buddies(gc->account, who);
+	jb = jabber_buddy_find(js, name, FALSE);
+
+	if(!jb || !(jb->subscription & JABBER_SUB_TO)) {
+		groups = g_slist_append(groups, grp->name);
+	}
 
 	jabber_roster_update(js, who, NULL);
 
-	jb = jabber_buddy_find(js, name, FALSE);
 	if(!jb || !(jb->subscription & JABBER_SUB_TO))
 		jabber_presence_subscription_set(js, who, "subscribe");
+
 	g_free(who);
 }