adium.1-3: a139b8af: applied partial changes from d6d62482a33...

zacw at adiumx.com zacw at adiumx.com
Sun Jul 5 15:45:21 EDT 2009


-----------------------------------------------------------------
Revision: a139b8af0bc2e07bf3fc4a65620d2cfbbf14b047
Ancestor: abf01263a12b500f0217fd8c62921fa1030fa1c2
Author: zacw at adiumx.com
Date: 2009-07-05T19:41:00
Branch: im.pidgin.adium.1-3
URL: http://d.pidgin.im/viewmtn/revision/info/a139b8af0bc2e07bf3fc4a65620d2cfbbf14b047

Modified files:
        libpurple/protocols/jabber/google.c
        libpurple/protocols/yahoo/yahoo.c

ChangeLog: 

applied partial changes from d6d62482a33ec2323ec2efb4e5e6be42257e66d3
                     through ae4e1a6ad5b5058239a63399cfcac51570912378

applied changes from 89e296ce85f6724fd51ae1efdc5883941cdf90ca
             through 1d57dde9d15fd79af85e8a28d21680c4a1b6be2b

applied changes from d6d0af3753826ea4715b3f4ca3bd41f0d63161b3
             through 89e296ce85f6724fd51ae1efdc5883941cdf90ca

applied changes from 1d57dde9d15fd79af85e8a28d21680c4a1b6be2b
             through b05f93669b412dc123c17699c1c394cb2f30673d

applied changes from b05f93669b412dc123c17699c1c394cb2f30673d
             through dc960b2ad7b32fa7d865552300a003a71689cfe9

applied changes from 5668e3b116ab205b1a3270d6aff7fca0332bccc6
             through 7f396ae5ae1a07562f3822bfdf32a5b71b737970

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/google.c	eb36981db65b68f60823a3f2d2609b5bc690ae21
+++ libpurple/protocols/jabber/google.c	8b8baafe4f163a6b35faa8d5947f87027aa13d20
@@ -180,10 +180,25 @@ void jabber_gmail_init(JabberStream *js)
 
 void jabber_gmail_init(JabberStream *js) {
 	JabberIq *iq;
+	xmlnode *usersetting, *mailnotifications;
 
-	if (!purple_account_get_check_mail(js->gc->account))
+	if (!purple_account_get_check_mail(purple_connection_get_account(js->gc)))
 		return;
 
+	/*
+	 * Quoting http://code.google.com/apis/talk/jep_extensions/usersettings.html:
+	 * To ensure better compatibility with other clients, rather than
+	 * setting this value to "false" to turn off notifications, it is
+	 * recommended that a client set this to "true" and filter incoming
+	 * email notifications itself.
+	 */
+	iq = jabber_iq_new(js, JABBER_IQ_SET);
+	usersetting = xmlnode_new_child(iq->node, "usersetting");
+	xmlnode_set_namespace(usersetting, "google:setting");
+	mailnotifications = xmlnode_new_child(usersetting, "mailnotifications");
+	xmlnode_set_attrib(mailnotifications, "value", "true");
+	jabber_iq_send(iq);
+
 	iq = jabber_iq_new_query(js, JABBER_IQ_GET, "google:mail:notify");
 	jabber_iq_set_callback(iq, jabber_gmail_parse, NULL);
 	jabber_iq_send(iq);
============================================================
--- libpurple/protocols/yahoo/yahoo.c	c2559a05aa07ddab2c2f637989edc7f5061dbd81
+++ libpurple/protocols/yahoo/yahoo.c	4cec01c07623081386bbc21a64d8cce83f6bc3b0
@@ -1485,7 +1485,7 @@ static void yahoo_auth16_stage2(PurpleUt
 #if GLIB_CHECK_VERSION(2,6,0)
 		totalelements = g_strv_length(split_data);
 #else
-		while (split_data[++totalelements] != NULL);	
+		while (split_data[++totalelements] != NULL);
 #endif
 		if (totalelements >= 4) {
 			response_no = strtol(split_data[0], NULL, 10);
@@ -1571,10 +1571,12 @@ static void yahoo_auth16_stage1_cb(Purpl
 #if GLIB_CHECK_VERSION(2,6,0)
 		totalelements = g_strv_length(split_data);
 #else
-		while (split_data[++totalelements] != NULL);	
+		while (split_data[++totalelements] != NULL);
 #endif
-		if(totalelements >= 2) {
+		if(totalelements == 1)
 			response_no = strtol(split_data[0], NULL, 10);
+		else if(totalelements >= 2) {
+			response_no = strtol(split_data[0], NULL, 10);
 			token = g_strdup(split_data[1] + strlen("ymsgr="));
 		}
 
@@ -1593,6 +1595,9 @@ static void yahoo_auth16_stage1_cb(Purpl
 					break;
 				case 1212:
 					/* Password incorrect */
+					/* Set password to NULL. Avoids account locking. Brings dialog to enter password if clicked on Re-enable account */
+					if (!purple_account_get_remember_password(purple_connection_get_account(gc)))
+						purple_account_set_password(purple_connection_get_account(gc), NULL);
 					error_reason = g_strdup(_("Incorrect Password"));
 					error = PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED;
 					break;


More information about the Commits mailing list