changeset 28763:75aab8587e90

merged with im.pidgin.pidgin
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Fri, 16 Oct 2009 13:48:35 +0900
parents bd8a1dad7f1c (current diff) 64fbf431d952 (diff)
children 9c40a91d6c39
files libpurple/certificate.c libpurple/protocols/oscar/oscar.c libpurple/protocols/oscar/oscar.h libpurple/protocols/yahoo/libymsg.c
diffstat 9 files changed, 57 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/COPYRIGHT	Wed Oct 14 13:26:08 2009 +0900
+++ b/COPYRIGHT	Fri Oct 16 13:48:35 2009 +0900
@@ -406,11 +406,10 @@
 Carsten Schaar
 Toby Schaffer
 Jonathan Schleifer <js-pidgin@webkeks.org>
-Matteo Settenvini
-Colin Seymour
 Luke Schierer
 Ralph Schmieder
 David Schmitt
+Heiko Schmitt
 Mark Schneider
 Evan Schoenberg
 Gabriel Schulhof
@@ -420,6 +419,8 @@
 Peter Seebach
 Don Seiler
 Leonardo Serra
+Matteo Settenvini
+Colin Seymour
 Jim Seymour
 Javeed Shaikh
 Joe Shaw
--- a/ChangeLog	Wed Oct 14 13:26:08 2009 +0900
+++ b/ChangeLog	Fri Oct 16 13:48:35 2009 +0900
@@ -9,6 +9,9 @@
 	* Fix building the GnuTLS plugin with older versions of GnuTLS.
 	* Fix DNS TXT query resolution.
 
+	AIM and ICQ:
+	* Fix blocking and other privacy lists.  (Thanks to AOL)
+
 	XMPP:
 	* Users connecting to Google Talk now have an "Initiate Chat" context menu
 	  option for their buddies.  (Eion Robb)
@@ -32,7 +35,7 @@
 
 	Pidgin:
 	* The userlist in a multiuser chat can be styled via gtkrc by using the
-	  widget name "pidgin_conv_userlist".
+	  widget name "pidgin_conv_userlist". (Heiko Schmitt)
 
 version 2.6.2 (09/05/2009):
 	libpurple:
--- a/libpurple/certificate.c	Wed Oct 14 13:26:08 2009 +0900
+++ b/libpurple/certificate.c	Fri Oct 16 13:48:35 2009 +0900
@@ -1402,13 +1402,15 @@
 		if (flags & PURPLE_CERTIFICATE_NAME_MISMATCH) {
 			gchar *sn = purple_certificate_get_subject_name(peer_crt);
 
-			g_string_append_printf(errors, _("The certificate claims to be "
-						"from \"%s\" instead. This could mean that you are "
-						"not connecting to the service you believe you are."),
-						sn);
-			g_free(sn);
+			if (sn) {
+				g_string_append_printf(errors, _("The certificate claims to be "
+							"from \"%s\" instead. This could mean that you are "
+							"not connecting to the service you believe you are."),
+							sn);
+				g_free(sn);
 
-			flags &= ~PURPLE_CERTIFICATE_NAME_MISMATCH;
+				flags &= ~PURPLE_CERTIFICATE_NAME_MISMATCH;
+			}
 		}
 
 		while (i != PURPLE_CERTIFICATE_LAST) {
--- a/libpurple/ft.h	Wed Oct 14 13:26:08 2009 +0900
+++ b/libpurple/ft.h	Fri Oct 16 13:48:35 2009 +0900
@@ -674,7 +674,7 @@
 void purple_xfer_ui_ready(PurpleXfer *xfer);
 
 /**
- * Allows the prpl to signal it's readh to send/receive data (depending on
+ * Allows the prpl to signal it's ready to send/receive data (depending on
  * the direction of the file transfer. Used when the prpl provides read/write
  * ops and cannot/does not provide a raw fd to the core.
  *
--- a/libpurple/protocols/jabber/chat.c	Wed Oct 14 13:26:08 2009 +0900
+++ b/libpurple/protocols/jabber/chat.c	Fri Oct 16 13:48:35 2009 +0900
@@ -106,7 +106,7 @@
 	{
 		char *room_jid = g_strdup_printf("%s@%s", room, server);
 
-		chat = g_hash_table_lookup(js->chats, jabber_normalize(NULL, room_jid));
+		chat = g_hash_table_lookup(js->chats, room_jid);
 		g_free(room_jid);
 	}
 
@@ -216,7 +216,8 @@
 	JabberChat *chat;
 	char *jid;
 
-	g_return_val_if_fail(jabber_chat_find(js, room, server) == NULL, NULL);
+	if (jabber_chat_find(js, room, server) != NULL)
+		return NULL;
 
 	chat = g_new0(JabberChat, 1);
 	chat->js = js;
@@ -264,7 +265,8 @@
 	char *jid;
 
 	chat = jabber_chat_new(js, room, server, handle, password, data);
-	g_return_val_if_fail(chat != NULL, NULL);
+	if (chat == NULL)
+		return NULL;
 
 	gc = js->gc;
 	account = purple_connection_get_account(gc);
@@ -371,7 +373,7 @@
 	JabberStream *js = chat->js;
 	char *room_jid = g_strdup_printf("%s@%s", chat->room, chat->server);
 
-	g_hash_table_remove(js->chats, jabber_normalize(NULL, room_jid));
+	g_hash_table_remove(js->chats, room_jid);
 	g_free(room_jid);
 }
 
--- a/libpurple/protocols/jabber/chat.h	Wed Oct 14 13:26:08 2009 +0900
+++ b/libpurple/protocols/jabber/chat.h	Fri Oct 16 13:48:35 2009 +0900
@@ -62,6 +62,8 @@
  * in-prpl function for joining a chat room. Doesn't require sticking goop
  * into a hash table.
  *
+ * @param room     The room to join. This MUST be normalized already.
+ * @param server   The server the room is on. This MUST be normalized already.
  * @param password The password (if required) to join the room. May be NULL.
  * @param data     The chat hash table.  May be NULL (it will be generated
  *                 for current core<>prpl API interface.)
--- a/libpurple/protocols/oscar/oscar.c	Wed Oct 14 13:26:08 2009 +0900
+++ b/libpurple/protocols/oscar/oscar.c	Fri Oct 16 13:48:35 2009 +0900
@@ -3942,12 +3942,8 @@
 	od->rights.maxpermits = (guint)maxpermits;
 	od->rights.maxdenies = (guint)maxdenies;
 
-	purple_connection_set_state(gc, PURPLE_CONNECTED);
-
 	purple_debug_info("oscar", "buddy list loaded\n");
 
-	aim_srv_clientready(od, conn);
-
 	if (purple_account_get_user_info(account) != NULL)
 		serv_set_info(gc, purple_account_get_user_info(account));
 
@@ -3990,6 +3986,22 @@
 	aim_srv_requestnew(od, SNAC_FAMILY_ALERT);
 	aim_srv_requestnew(od, SNAC_FAMILY_CHATNAV);
 
+	od->bos.have_rights = TRUE;
+
+	/*
+	 * If we've already received our feedbag data then we're not waiting on
+	 * anything else, so send the server clientready.
+	 *
+	 * Normally we get bos rights before we get our feedbag data, so this
+	 * rarely (never?) happens.  And I'm not sure it actually matters if we
+	 * wait for bos rights before calling clientready.  But it seems safer
+	 * to do it this way.
+	 */
+	if (od->ssi.received_data) {
+		aim_srv_clientready(od, conn);
+		purple_connection_set_state(gc, PURPLE_CONNECTED);
+	}
+
 	return 1;
 }
 
@@ -5425,6 +5437,15 @@
 	oscar_set_icon(gc, img);
 	purple_imgstore_unref(img);
 
+	/*
+	 * If we've already received our bos rights then we're not waiting on
+	 * anything else, so send the server clientready.
+	 */
+	if (od->bos.have_rights) {
+		aim_srv_clientready(od, conn);
+		purple_connection_set_state(gc, PURPLE_CONNECTED);
+	}
+
 	return 1;
 }
 
--- a/libpurple/protocols/oscar/oscar.h	Wed Oct 14 13:26:08 2009 +0900
+++ b/libpurple/protocols/oscar/oscar.h	Fri Oct 16 13:48:35 2009 +0900
@@ -535,6 +535,10 @@
 		struct aim_userinfo_s *userinfo;
 	} locate;
 
+	struct {
+		gboolean have_rights;
+	} bos;
+
 	/* Server-stored information (ssi) */
 	struct {
 		gboolean received_data;
--- a/libpurple/protocols/yahoo/libymsg.c	Wed Oct 14 13:26:08 2009 +0900
+++ b/libpurple/protocols/yahoo/libymsg.c	Fri Oct 16 13:48:35 2009 +0900
@@ -1140,10 +1140,12 @@
 			}
 		}
 
+		if(im->fed != YAHOO_FEDERATION_NONE)
+			g_free(fed_from);
+
 		g_free(im);
 	}
-	if (fed_from != im->from)
-		g_free(fed_from);
+
 	g_slist_free(list);
 }