rpms/pidgin/F-9 pidgin-2.5.2-GtkIMHtmlSmileys-remove-crash.patch, NONE, 1.1 pidgin-2.5.2-NetworkManager-improvement.patch, NONE, 1.1 pidgin-2.5.2-no-password-in-dialog-if-not-remembering.patch, NONE, 1.1 pidgin-2.5.2-remove-dialog-from-open-dialog-list.patch, NONE, 1.1 pidgin-2.5.2-sametime-redirect-null.patch, NONE, 1.1 pidgin-2.5.2-smilie-theme-change-crash.patch, NONE, 1.1 pidgin-2.5.2-temporarily-remember-password-during-auto-reconnect.patch, NONE, 1.1 pidgin-2.5.2-url_fetch_connect_cb-double-free.patch, NONE, 1.1 pidgin.spec, 1.59, 1.60

Warren Togami 砥上勇 wtogami at fedoraproject.org
Fri Nov 21 20:26:25 UTC 2008


Author: wtogami

Update of /cvs/pkgs/rpms/pidgin/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv1653

Modified Files:
	pidgin.spec 
Added Files:
	pidgin-2.5.2-GtkIMHtmlSmileys-remove-crash.patch 
	pidgin-2.5.2-NetworkManager-improvement.patch 
	pidgin-2.5.2-no-password-in-dialog-if-not-remembering.patch 
	pidgin-2.5.2-remove-dialog-from-open-dialog-list.patch 
	pidgin-2.5.2-sametime-redirect-null.patch 
	pidgin-2.5.2-smilie-theme-change-crash.patch 
	pidgin-2.5.2-temporarily-remember-password-during-auto-reconnect.patch 
	pidgin-2.5.2-url_fetch_connect_cb-double-free.patch 
Log Message:
  100: sametime-redirect-null crash
  101: NetworkManager-improvement
  102: no-password-in-dialog-if-not-remembering
  103: temporarily-remember-password-during-auto-reconnect
  104: smilie-theme-change-crash
  105: url_fetch_connect_cb-double-free crash
  106: GtkIMHtmlSmileys-remove-crash
  107: remove-dialog-from-open-dialog-list


pidgin-2.5.2-GtkIMHtmlSmileys-remove-crash.patch:

--- NEW FILE pidgin-2.5.2-GtkIMHtmlSmileys-remove-crash.patch ---
http://developer.pidgin.im/viewmtn/revision/info/633ffe234af48ead3631ae62e23840b4438fcf5f
Don't try to remove GtkIMHtmlSmileys from smiley trees if the GtkIMHtml
that the smiley refers to doesn't exist anymore.
Yes, I know this is a bit hacky, but I couldn't find another obvious way to do
it without adding stuff in gtksmiley.c...
http://developer.pidgin.im/viewmtn/revision/info/9a91956125003141d6eb6d89094aa76ae479879a
Remove that hack involving GtkIMHtmlSmileys
Thanks to Sadrul for hinting about the solution

diff -urN pidgin-2.5.2.orig/pidgin/gtkimhtml.c pidgin-2.5.2/pidgin/gtkimhtml.c
--- pidgin-2.5.2.orig/pidgin/gtkimhtml.c	2008-11-21 14:43:49.000000000 -0500
+++ pidgin-2.5.2/pidgin/gtkimhtml.c	2008-11-21 14:48:32.000000000 -0500
@@ -2054,12 +2054,23 @@
 }
 
 static void
+gtk_imhtml_disconnect_smiley(GtkIMHtml *imhtml, GtkIMHtmlSmiley *smiley)
+{
+	smiley->imhtml = NULL;
+	g_signal_handlers_disconnect_matched(imhtml, G_SIGNAL_MATCH_DATA, 0, 0,
+		NULL, NULL, smiley);
+}
+
+static void
 gtk_imhtml_disassociate_smiley(GtkIMHtmlSmiley *smiley)
 {
 	if (smiley->imhtml) {
 		gtk_smiley_tree_remove(smiley->imhtml->default_smilies, smiley);
 		g_hash_table_foreach(smiley->imhtml->smiley_data, 
 			gtk_imhtml_disassociate_smiley_foreach, smiley);
+		g_signal_handlers_disconnect_matched(smiley->imhtml, G_SIGNAL_MATCH_DATA,
+			0, 0, NULL, NULL, smiley);
+		smiley->imhtml = NULL;
 	}
 }
 
@@ -2079,9 +2090,19 @@
 		g_hash_table_insert(imhtml->smiley_data, g_strdup(sml), tree);
 	}
 
+	/* need to disconnect old imhtml, if there is one */
+	if (smiley->imhtml) {
+		g_signal_handlers_disconnect_matched(smiley->imhtml, G_SIGNAL_MATCH_DATA,
+			0, 0, NULL, NULL, smiley);
+	}
+	
 	smiley->imhtml = imhtml;
 
 	gtk_smiley_tree_insert (tree, smiley);
+	
+	/* connect destroy signal for the imhtml */
+	g_signal_connect(imhtml, "destroy", G_CALLBACK(gtk_imhtml_disconnect_smiley), 
+		smiley);
 }
 
 static gboolean
diff -urN pidgin-2.5.2.orig/pidgin/gtkthemes.c pidgin-2.5.2/pidgin/gtkthemes.c
--- pidgin-2.5.2.orig/pidgin/gtkthemes.c	2008-06-12 00:25:39.000000000 -0400
+++ pidgin-2.5.2/pidgin/gtkthemes.c	2008-11-21 14:49:03.000000000 -0500
@@ -169,6 +169,12 @@
 	for (wer = theme->list; wer != NULL; wer = theme->list) {
 		while (wer->smileys) {
 			GtkIMHtmlSmiley *uio = wer->smileys->data;
+			
+			if (uio->imhtml) {
+				g_signal_handlers_disconnect_matched(uio->imhtml, G_SIGNAL_MATCH_DATA,
+					0, 0, NULL, NULL, uio);
+			}
+				
 			if (uio->icon)
 				g_object_unref(uio->icon);
 			if (g_hash_table_lookup(already_freed, uio->file) == NULL) {

pidgin-2.5.2-NetworkManager-improvement.patch:

--- NEW FILE pidgin-2.5.2-NetworkManager-improvement.patch ---
http://developer.pidgin.im/viewmtn/revision/info/c4db69fe62c1650d1fb404a8bbb12bf47852f70c
Improve our NetworkManager support in a couple of ways:
* We no longer show error minidialogs when the network is not available.
* We no longer ask NetworkManager (over DBus) for the network state with
every call to purple_network_is_available(). We now cache the result.
* Be a little more robust when we're not sure of the connection status.
Fixes #7323

diff -urN pidgin-2.5.2.orig/libpurple/network.c pidgin-2.5.2/libpurple/network.c
--- pidgin-2.5.2.orig/libpurple/network.c	2008-11-20 15:32:49.000000000 -0500
+++ pidgin-2.5.2/libpurple/network.c	2008-11-21 13:34:33.000000000 -0500
@@ -66,6 +66,8 @@
 static DBusGConnection *nm_conn = NULL;
 static DBusGProxy *nm_proxy = NULL;
 static DBusGProxy *dbus_proxy = NULL;
+static NMState nm_state = NM_STATE_UNKNOWN;
+static gboolean have_nm_state = FALSE;
 
 #elif defined _WIN32
 static int current_network_count;
@@ -596,13 +598,15 @@
 purple_network_is_available(void)
 {
 #ifdef HAVE_NETWORKMANAGER
-	NMState state = nm_get_network_state();
-	if (state == NM_STATE_UNKNOWN)
+	if (!have_nm_state)
 	{
-		purple_debug_warning("network", "NetworkManager not active. Assuming connection exists.\n");
-		return TRUE;
+		have_nm_state = TRUE;
+		nm_state = nm_get_network_state();
+		if (nm_state == NM_STATE_UNKNOWN)
+			purple_debug_warning("network", "NetworkManager not active. Assuming connection exists.\n");
 	}
-	else if (state == NM_STATE_CONNECTED)
+
+	if (nm_state == NM_STATE_UNKNOWN || nm_state == NM_STATE_CONNECTED)
 		return TRUE;
 
 	return FALSE;
@@ -618,9 +622,12 @@
 static void
 nm_update_state(NMState state)
 {
-	static NMState prev = NM_STATE_UNKNOWN;
+	NMState prev = nm_state;
 	PurpleConnectionUiOps *ui_ops = purple_connections_get_ui_ops();
 
+	have_nm_state = TRUE;
+	nm_state = state;
+
 	purple_signal_emit(purple_network_get_handle(), "network-configuration-changed", NULL);
 
 	switch(state)
@@ -628,16 +635,14 @@
 		case NM_STATE_CONNECTED:
 			if (ui_ops != NULL && ui_ops->network_connected != NULL)
 				ui_ops->network_connected();
-			prev = state;
 			break;
 		case NM_STATE_ASLEEP:
 		case NM_STATE_CONNECTING:
 		case NM_STATE_DISCONNECTED:
-			if (prev != NM_STATE_CONNECTED)
+			if (prev != NM_STATE_CONNECTED && prev != NM_STATE_UNKNOWN)
 				break;
 			if (ui_ops != NULL && ui_ops->network_disconnected != NULL)
 				ui_ops->network_disconnected();
-			prev = state;
 			break;
 		case NM_STATE_UNKNOWN:
 		default:
@@ -662,7 +667,6 @@
 		return NM_STATE_UNKNOWN;
 
 	if (!dbus_g_proxy_call(nm_proxy, "state", &err, G_TYPE_INVALID, G_TYPE_UINT, &state, G_TYPE_INVALID)) {
-		/* XXX: Print an error? */
 		g_error_free(err);
 		return NM_STATE_UNKNOWN;
 	}
diff -urN pidgin-2.5.2.orig/libpurple/prpl.c pidgin-2.5.2/libpurple/prpl.c
--- pidgin-2.5.2.orig/libpurple/prpl.c	2008-08-06 17:57:06.000000000 -0400
+++ pidgin-2.5.2/libpurple/prpl.c	2008-11-21 13:34:43.000000000 -0500
@@ -23,6 +23,7 @@
 #include "internal.h"
 #include "conversation.h"
 #include "debug.h"
+#include "network.h"
 #include "notify.h"
 #include "prpl.h"
 #include "request.h"
@@ -317,7 +318,8 @@
 	PurplePluginProtocolInfo *prpl_info;
 
 	if (purple_status_is_online(new_status) &&
-		purple_account_is_disconnected(account))
+		purple_account_is_disconnected(account) &&
+		purple_network_is_available())
 	{
 		purple_account_connect(account);
 		return;
diff -urN pidgin-2.5.2.orig/pidgin/gtkconn.c pidgin-2.5.2/pidgin/gtkconn.c
--- pidgin-2.5.2.orig/pidgin/gtkconn.c	2008-09-29 20:00:28.000000000 -0400
+++ pidgin-2.5.2/pidgin/gtkconn.c	2008-11-21 13:34:49.000000000 -0500
@@ -208,9 +208,7 @@
 	while (l) {
 		PurpleAccount *a = (PurpleAccount*)l->data;
 		if (!purple_account_is_disconnected(a)) {
-			purple_connection_error_reason(purple_account_get_connection(a),
-			                               PURPLE_CONNECTION_ERROR_NETWORK_ERROR,
-			                               _("Network disconnected"));
+			purple_account_disconnect(a);
 		}
 		l = l->next;
 	}

pidgin-2.5.2-no-password-in-dialog-if-not-remembering.patch:

--- NEW FILE pidgin-2.5.2-no-password-in-dialog-if-not-remembering.patch ---
http://developer.pidgin.im/viewmtn/revision/info/8ae38e4108c4c7c302ab389b0491db4a884bad40
Don't populate the password field on the modify account dialog if we are
not actually remembering it permanently

diff -urN pidgin-2.5.2.orig/pidgin/gtkaccount.c pidgin-2.5.2/pidgin/gtkaccount.c
--- pidgin-2.5.2.orig/pidgin/gtkaccount.c	2008-10-18 12:51:50.000000000 -0400
+++ pidgin-2.5.2/pidgin/gtkaccount.c	2008-11-21 13:44:19.000000000 -0500
@@ -562,7 +562,8 @@
 
 	/* Set the fields. */
 	if (dialog->account != NULL) {
-		if (purple_account_get_password(dialog->account))
+		if (purple_account_get_password(dialog->account) &&
+		    purple_account_get_remember_password(dialog->account))
 			gtk_entry_set_text(GTK_ENTRY(dialog->password_entry),
 							   purple_account_get_password(dialog->account));
 

pidgin-2.5.2-remove-dialog-from-open-dialog-list.patch:

--- NEW FILE pidgin-2.5.2-remove-dialog-from-open-dialog-list.patch ---
http://developer.pidgin.im/viewmtn/revision/info/e05d46b1a88dfa81c3cc655bf9ab3e90bb6be828
Fix an assertion failure/unlikely crash when:
1. Open a purple_notify_formatted() dialog, such as the QQ about window
or the AIM "who am I waiting on authorization from?" dialog
2. Close the dialog with the close button
3. Sign off the account
The problem is that the dialog was closed, but it was not removed from
the list of open dialogs. So purple_notify_close_with_handle() tried
to close it again.

diff -urN pidgin-2.5.2.orig/pidgin/gtknotify.c pidgin-2.5.2/pidgin/gtknotify.c
--- pidgin-2.5.2.orig/pidgin/gtknotify.c	2008-08-29 21:53:56.000000000 -0400
+++ pidgin-2.5.2/pidgin/gtknotify.c	2008-11-21 14:55:56.000000000 -0500
@@ -703,7 +703,7 @@
 	gtk_widget_grab_focus(button);
 
 	g_signal_connect_swapped(G_OBJECT(button), "clicked",
-							 G_CALLBACK(gtk_widget_destroy), window);
+							 G_CALLBACK(formatted_close_cb), window);
 	g_signal_connect(G_OBJECT(window), "key_press_event",
 					 G_CALLBACK(formatted_input_cb), NULL);
 

pidgin-2.5.2-sametime-redirect-null.patch:

--- NEW FILE pidgin-2.5.2-sametime-redirect-null.patch ---
https://bugzilla.redhat.com/show_bug.cgi?id=471938
pidgin segfaults on sametime/meanwhile login redirect to NULL

diff -urN pidgin-2.5.2.orig/libpurple/protocols/sametime/sametime.c pidgin-2.5.2/libpurple/protocols/sametime/sametime.c
--- pidgin-2.5.2.orig/libpurple/protocols/sametime/sametime.c	2008-08-07 09:31:09.000000000 -0400
+++ pidgin-2.5.2/libpurple/protocols/sametime/sametime.c	2008-11-20 16:18:18.000000000 -0500
@@ -1444,7 +1444,8 @@
   current_host = purple_account_get_string(account, MW_KEY_HOST,
 					 MW_PLUGIN_DEFAULT_HOST);
 
-  if(purple_account_get_bool(account, MW_KEY_FORCE, FALSE) ||
+  if((! host) ||
+     purple_account_get_bool(account, MW_KEY_FORCE, FALSE) ||
      (! strcmp(current_host, host)) ||
      (purple_proxy_connect(NULL, account, host, port, connect_cb, pd) == NULL)) {
 

pidgin-2.5.2-smilie-theme-change-crash.patch:

--- NEW FILE pidgin-2.5.2-smilie-theme-change-crash.patch ---
http://developer.pidgin.im/viewmtn/revision/info/5ccc437b944e0675b75037409a01416e31650e7f
What was I thinking... The GtkIMHtmlSmileys in the smiley trees aren't owned
by the smiley trees, so NULLing a pointer in there is not a good idea...
By the time gtk_smiley_tree_destroy is called the smileys are gone.
This should fix #7345 and that "crash when changing smiley theme while there
are smileys in input boxes" bug someone reported on #pidgin
Closes #7345 

diff -urN pidgin-2.5.2.orig/pidgin/gtkimhtml.c pidgin-2.5.2/pidgin/gtkimhtml.c
--- pidgin-2.5.2.orig/pidgin/gtkimhtml.c	2008-09-28 20:43:24.000000000 -0400
+++ pidgin-2.5.2/pidgin/gtkimhtml.c	2008-11-21 14:36:42.000000000 -0500
@@ -348,9 +348,7 @@
 			g_string_free (t->values, TRUE);
 			g_free (t->children);
 		}
-		if (t && t->image) {
-			t->image->imhtml = NULL;
-		}
+		
 		g_free (t);
 	}
 }

pidgin-2.5.2-temporarily-remember-password-during-auto-reconnect.patch:

--- NEW FILE pidgin-2.5.2-temporarily-remember-password-during-auto-reconnect.patch ---
http://developer.pidgin.im/viewmtn/revision/info/bcd6dbfb605e7969c586fa89f022a3877b9a8c48
Temporarily remember account password across network disconnection to allow
automatic reconnection when the network returns to work even if the
password is not permanently saved.

diff -urN pidgin-2.5.2.orig/pidgin/gtkconn.c pidgin-2.5.2/pidgin/gtkconn.c
--- pidgin-2.5.2.orig/pidgin/gtkconn.c	2008-11-21 13:51:35.000000000 -0500
+++ pidgin-2.5.2/pidgin/gtkconn.c	2008-11-21 13:53:03.000000000 -0500
@@ -208,7 +208,10 @@
 	while (l) {
 		PurpleAccount *a = (PurpleAccount*)l->data;
 		if (!purple_account_is_disconnected(a)) {
+			char *password = g_strdup(purple_account_get_password(a));
 			purple_account_disconnect(a);
+			purple_account_set_password(a, password);
+			g_free(password);
 		}
 		l = l->next;
 	}

pidgin-2.5.2-url_fetch_connect_cb-double-free.patch:

--- NEW FILE pidgin-2.5.2-url_fetch_connect_cb-double-free.patch ---
http://developer.pidgin.im/viewmtn/revision/info/27f7d38af8dba617aba8109d82e27907cd7d8b41
Trigger url_fetch_connect_cb() asynchronously when the connection fails
immediately instead of synchronously calling the callback and then returning
NULL, causing a double free.
Fixes #7278

diff -urN pidgin-2.5.2.orig/libpurple/util.c pidgin-2.5.2/libpurple/util.c
--- pidgin-2.5.2.orig/libpurple/util.c	2008-09-23 12:34:05.000000000 -0400
+++ pidgin-2.5.2/libpurple/util.c	2008-11-21 14:42:09.000000000 -0500
@@ -3979,6 +3979,13 @@
 					     callback, user_data);
 }
 
+static gboolean
+url_fetch_connect_failed(gpointer data)
+{
+	url_fetch_connect_cb(data, -1, "");
+	return FALSE;
+}
+
 PurpleUtilFetchUrlData *
 purple_util_fetch_url_request_len(const char *url, gboolean full,
 		const char *user_agent, gboolean http11,
@@ -4016,9 +4023,8 @@
 
 	if (gfud->connect_data == NULL)
 	{
-		purple_util_fetch_url_error(gfud, _("Unable to connect to %s"),
-				gfud->website.address);
-		return NULL;
+		/* Trigger the connect_cb asynchronously. */
+		purple_timeout_add(10, url_fetch_connect_failed, gfud);
 	}
 
 	return gfud;


Index: pidgin.spec
===================================================================
RCS file: /cvs/pkgs/rpms/pidgin/F-9/pidgin.spec,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- pidgin.spec	21 Oct 2008 00:55:27 -0000	1.59
+++ pidgin.spec	21 Nov 2008 20:26:24 -0000	1.60
@@ -31,7 +31,7 @@
 
 Name:		pidgin
 Version:	2.5.2
-Release:	1%{?dist}
+Release:	2%{?dist}
 License:        GPLv2+ and GPLv2 and MIT
 # GPLv2+ - libpurple, gnt, finch, pidgin, most prpls
 # GPLv2 - silc & novell prpls
@@ -64,6 +64,14 @@
 Patch0: pidgin-2.4.2-reread-resolvconf.patch
 
 ## Patches 100+: To be Included in Future Upstream
+Patch100:      pidgin-2.5.2-sametime-redirect-null.patch
+Patch101:      pidgin-2.5.2-NetworkManager-improvement.patch
+Patch102:      pidgin-2.5.2-no-password-in-dialog-if-not-remembering.patch 
+Patch103:      pidgin-2.5.2-temporarily-remember-password-during-auto-reconnect.patch
+Patch104:      pidgin-2.5.2-smilie-theme-change-crash.patch
+Patch105:      pidgin-2.5.2-url_fetch_connect_cb-double-free.patch
+Patch106:      pidgin-2.5.2-GtkIMHtmlSmileys-remove-crash.patch
+Patch107:      pidgin-2.5.2-remove-dialog-from-open-dialog-list.patch
 
 
 BuildRoot:	%{_tmppath}/%{name}-%{version}-root
@@ -307,6 +315,14 @@
 %patch0 -p1 -b .resolv
 
 ## Patches 100+: To be Included in Future Upstream
+%patch100 -p1 -b sametime-redirect-null
+%patch101 -p1 -b NetworkManager-improvement
+%patch102 -p1 -b no-password-in-dialog-if-not-remembering
+%patch103 -p1 -b temporarily-remember-password-during-auto-reconnect
+%patch104 -p1 -b smilie-theme-change-crash
+%patch105 -p1 -b url_fetch_connect_cb-double-free
+%patch106 -p1 -b GtkIMHtmlSmileys-remove-crash
+%patch107 -p1 -b remove-dialog-from-open-dialog-list
 
 # Our preferences
 cp %{SOURCE1} prefs.xml
@@ -541,6 +557,17 @@
 %endif
 
 %changelog
+* Fri Nov 21 2008 Warren Togami <wtogami at redhat.com> 2.5.2-2
+- Upstream backports:
+  100: sametime-redirect-null crash
+  101: NetworkManager-improvement
+  102: no-password-in-dialog-if-not-remembering
+  103: temporarily-remember-password-during-auto-reconnect
+  104: smilie-theme-change-crash
+  105: url_fetch_connect_cb-double-free crash
+  106: GtkIMHtmlSmileys-remove-crash
+  107: remove-dialog-from-open-dialog-list
+
 * Mon Oct 20 2008 Stu Tomlinson <stu at nosnilmot.com> 2.5.2-1
 - 2.5.2
 - Generate doxygen API documentation (#466693)




More information about the fedora-extras-commits mailing list