pidgin: 3af0a444: Fix crash selecting Tools->Set Mood when...

markdoliner at pidgin.im markdoliner at pidgin.im
Tue Jul 26 02:35:24 EDT 2011


----------------------------------------------------------------------
Revision: 3af0a4445a2e76ca0d3d66ad4a3fb376448826ce
Parent:   b70acfdcb7f230d012338dbab6fbba50c01772ed
Author:   markdoliner at pidgin.im
Date:     07/26/11 02:32:35
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/3af0a4445a2e76ca0d3d66ad4a3fb376448826ce

Changelog: 

Fix crash selecting Tools->Set Mood when you're online with an
ICQ account that is configured as an AIM account. (fixes #14437)

Changes against parent b70acfdcb7f230d012338dbab6fbba50c01772ed

  patched  ChangeLog
  patched  libpurple/protocols/oscar/oscar.c

-------------- next part --------------
============================================================
--- ChangeLog	683a6629ddb74d7d439dee84cd68a0808be2f584
+++ ChangeLog	b830084bda89fcc9925000e633a67804c38687b4
@@ -20,6 +20,10 @@ version 2.10.0 (MM/DD/YYYY):
 	* Fix building of the bundled libgadu library with older versions
 	  of GnuTLS. (patch plucked from upstream) (#14365)
 
+	ICQ:
+	* Fix crash selecting Tools->Set Mood when you're online with an
+	  ICQ account that is configured as an AIM account. (#14437)
+
 	IRC:
 	* Fix the handling of formatting following mIRC ^O (#14436)
 
============================================================
--- libpurple/protocols/oscar/oscar.c	137e7b27e38dce736dc481fe8d4176b528934936
+++ libpurple/protocols/oscar/oscar.c	c358306cfcf3155198b4f084863a04e7d9e3dcda
@@ -743,11 +743,15 @@ oscar_login(PurpleAccount *account)
 	gc->flags |= PURPLE_CONNECTION_HTML;
 	if (oscar_util_valid_name_icq((purple_account_get_username(account)))) {
 		od->icq = TRUE;
-		gc->flags |= PURPLE_CONNECTION_SUPPORT_MOODS;
 	} else {
 		gc->flags |= PURPLE_CONNECTION_AUTO_RESP;
 	}
 
+	/* Set this flag based on the protocol_id rather than the username,
+	   because that is what's tied to the get_moods prpl callback. */
+	if (g_str_equal(purple_account_get_protocol_id(account), "prpl-icq"))
+		gc->flags |= PURPLE_CONNECTION_SUPPORT_MOODS;
+
 	od->default_port = purple_account_get_int(account, "port", OSCAR_DEFAULT_LOGIN_PORT);
 
 	encryption_type = purple_account_get_string(account, "encryption", OSCAR_DEFAULT_ENCRYPTION);


More information about the Commits mailing list