changeset 26759:fc8c1933bc22

propagate from branch 'im.pidgin.pidgin' (head e028e1fa5d4d70792f0219311b12e5f4b1587776) to branch 'im.pidgin.cpw.darkrain42.docs' (head 2fec5896a8d1642235382a15d2ee7e988b6acf34)
author Paul Aurich <paul@darkrain42.org>
date Fri, 03 Apr 2009 02:42:38 +0000
parents efbbd2e2b29e (current diff) d58ea4aa159d (diff)
children 78ef23551355
files
diffstat 7 files changed, 32 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Mar 28 18:59:23 2009 +0000
+++ b/ChangeLog	Fri Apr 03 02:42:38 2009 +0000
@@ -14,6 +14,10 @@
 	* Add support for sending attentions (equivalent to "buzz" and "nudge")
 	  using the command /buzz (XEP-0224).
 
+	IRC:
+	* Correctly handle WHOIS for users who are joined to a large number of
+	  channels.
+
 	Pidgin:
 	* Added -f command line option to tell Pidgin to ignore NetworkManager
 	  and assume it has a valid network connection.
--- a/libpurple/protocols/irc/irc.h	Sat Mar 28 18:59:23 2009 +0000
+++ b/libpurple/protocols/irc/irc.h	Fri Apr 03 02:42:38 2009 +0000
@@ -72,7 +72,7 @@
 		char *name;
 		char *server;
 		char *serverinfo;
-		char *channels;
+		GString *channels;
 		int ircop;
 		int identified;
 		int idle;
--- a/libpurple/protocols/irc/msgs.c	Sat Mar 28 18:59:23 2009 +0000
+++ b/libpurple/protocols/irc/msgs.c	Fri Apr 03 02:42:38 2009 +0000
@@ -336,7 +336,11 @@
 		if (args[3])
 			irc->whois.signon = (time_t)atoi(args[3]);
 	} else if (!strcmp(name, "319")) {
-		irc->whois.channels = g_strdup(args[2]);
+		if (irc->whois.channels == NULL) {
+			irc->whois.channels = g_string_new(args[2]);
+		} else {
+			irc->whois.channels = g_string_append(irc->whois.channels, args[2]);
+		}
 	} else if (!strcmp(name, "320")) {
 		irc->whois.identified = 1;
 	}
@@ -391,8 +395,8 @@
 		g_free(irc->whois.serverinfo);
 	}
 	if (irc->whois.channels) {
-		purple_notify_user_info_add_pair(user_info, _("Currently on"), irc->whois.channels);
-		g_free(irc->whois.channels);
+		purple_notify_user_info_add_pair(user_info, _("Currently on"), irc->whois.channels->str);
+		g_string_free(irc->whois.channels, TRUE);
 	}
 	if (irc->whois.idle) {
 		gchar *timex = purple_str_seconds_to_string(irc->whois.idle);
--- a/libpurple/protocols/msn/contact.c	Sat Mar 28 18:59:23 2009 +0000
+++ b/libpurple/protocols/msn/contact.c	Fri Apr 03 02:42:38 2009 +0000
@@ -697,25 +697,28 @@
 				/*TODO:  need to support the Mobile type*/
 				continue;
 			}
-			for (contactEmailNode = xmlnode_get_child(emailsNode, "ContactEmail"); contactEmailNode;
-					contactEmailNode = xmlnode_get_next_twin(contactEmailNode)) {
-				if (!(messengerEnabledNode = xmlnode_get_child(contactEmailNode, "isMessengerEnabled")))
-					continue;
+			for (contactEmailNode = xmlnode_get_child(emailsNode, "ContactEmail");
+			     contactEmailNode;
+			     contactEmailNode = xmlnode_get_next_twin(contactEmailNode)) {
+				if ((messengerEnabledNode = xmlnode_get_child(contactEmailNode, "isMessengerEnabled"))) {
 
-				msnEnabled = xmlnode_get_data(messengerEnabledNode);
+					msnEnabled = xmlnode_get_data(messengerEnabledNode);
+
+					if (msnEnabled && !strcmp(msnEnabled, "true")) {
+						if ((emailNode = xmlnode_get_child(contactEmailNode, "email")))
+							passport = xmlnode_get_data(emailNode);
 
-				if (msnEnabled && !strcmp(msnEnabled, "true")) {
-					if ((emailNode = xmlnode_get_child(contactEmailNode, "email")))
-						passport = xmlnode_get_data(emailNode);
+						/* Messenger enabled, Get the Passport*/
+						purple_debug_info("msn", "AB Yahoo/Federated User %s\n", passport ? passport : "(null)");
+						g_free(msnEnabled);
+						break;
+					}
 
-					/*Messenger enabled, Get the Passport*/
-					purple_debug_info("msn", "AB Yahoo/Federated User %s\n", passport ? passport : "(null)");
 					g_free(msnEnabled);
-					break;
 				}
-
-				g_free(msnEnabled);
 			}
+			if (passport == NULL) /* Couldn't find anything */
+				continue;
 		} else {
 			xmlnode *messenger_user;
 			/* ignore non-messenger contacts */
--- a/libpurple/protocols/msn/soap.c	Sat Mar 28 18:59:23 2009 +0000
+++ b/libpurple/protocols/msn/soap.c	Fri Apr 03 02:42:38 2009 +0000
@@ -667,6 +667,7 @@
 			conn->handled_len = 0;
 			conn->current_request = req;
 
+			purple_input_remove(conn->event_handle);
 			conn->event_handle = purple_input_add(conn->ssl->fd,
 				PURPLE_INPUT_WRITE, msn_soap_write_cb, conn);
 			if (!msn_soap_write_cb_internal(conn, conn->ssl->fd, PURPLE_INPUT_WRITE, TRUE)) {
--- a/libpurple/protocols/oscar/oscar.c	Sat Mar 28 18:59:23 2009 +0000
+++ b/libpurple/protocols/oscar/oscar.c	Fri Apr 03 02:42:38 2009 +0000
@@ -4847,6 +4847,7 @@
 		/* TODO: Combine these two calls! */
 		aim_srv_setextrainfo(od, FALSE, 0, TRUE, status_text, itmsurl);
 		oscar_set_extendedstatus(gc);
+		g_free(status_text);
 	}
 }
 
--- a/pidgin/gtkutils.c	Sat Mar 28 18:59:23 2009 +0000
+++ b/pidgin/gtkutils.c	Fri Apr 03 02:42:38 2009 +0000
@@ -3578,7 +3578,9 @@
 	if (tmp == NULL)
 		return FALSE;
 
+	g_free(tmp);
 	tmp = NULL;
+
 	if (!g_spawn_command_line_sync("gconftool-2 --all-dirs /desktop/gnome/url-handlers",
 	                               &tmp, &err, NULL, NULL))
 	{