changeset 19766:d928bccffe4c

[gaim-migrate @ 16952] update for fail-safe check of Passport 3.0's Authentication committer: Ethan Blanton <elb@pidgin.im>
author Ma Yuan <mayuan2006@gmail.com>
date Mon, 21 Aug 2006 16:16:10 +0000
parents 4c7aa3b07f42
children 6bc69cd68d3c
files src/protocols/msn/nexus.c src/protocols/msn/userlist.c
diffstat 2 files changed, 10 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/msn/nexus.c	Sat Aug 19 16:48:46 2006 +0000
+++ b/src/protocols/msn/nexus.c	Mon Aug 21 16:16:10 2006 +0000
@@ -163,7 +163,7 @@
 	MsnSoapConn *soapconn;
 	MsnNexus * nexus;
 	MsnSession *session;
-	char *ru,*lc,*id,*tw,*ct,*kpp,*kv,*ver,*rn,*tpf;
+	char *ru,*lc,*id,*tw,*ct,*kpp,*kv,*ver,*rn,*tpf,*fs;
 	char *username, *password;
 	char *request_str, *head, *tail,*challenge_str;
 
@@ -187,6 +187,7 @@
 	lc =	(char *)g_hash_table_lookup(nexus->challenge_data, "lc");
 	id =	(char *)g_hash_table_lookup(nexus->challenge_data, "id");
 	tw =	(char *)g_hash_table_lookup(nexus->challenge_data, "tw");
+	fs =	(char *)g_hash_table_lookup(nexus->challenge_data, "fs");
 	ru =	(char *)g_hash_table_lookup(nexus->challenge_data, "ru");
 	ct =	(char *)g_hash_table_lookup(nexus->challenge_data, "ct");
 	kpp=	(char *)g_hash_table_lookup(nexus->challenge_data, "kpp");
@@ -206,10 +207,14 @@
 		return;
 	}
 
+	if(!fs){
+		fs =g_strdup_printf("1");
+	}
 	challenge_str = g_strdup_printf(
-		"lc=%s&amp;id=%s&amp;tw=%s&amp;fs=1&amp;ru=%s&amp;ct=%s&amp;kpp=%s&amp;kv=%s&amp;ver=%s&amp;rn=%s&amp;tpf=%s\r\n",
-		lc,id,tw,ru,ct,kpp,kv,ver,rn,tpf
+		"lc=%s&amp;id=%s&amp;tw=%s&amp;fs=%s&amp;ru=%s&amp;ct=%s&amp;kpp=%s&amp;kv=%s&amp;ver=%s&amp;rn=%s&amp;tpf=%s\r\n",
+		lc,id,tw,fs,ru,ct,kpp,kv,ver,rn,tpf
 		);
+	g_free(fs);
 
 	/*build the SOAP windows Live ID XML body */
 	tail = g_strdup_printf(TWN_ENVELOP_TEMPLATE,username,password,challenge_str	);
--- a/src/protocols/msn/userlist.c	Sat Aug 19 16:48:46 2006 +0000
+++ b/src/protocols/msn/userlist.c	Mon Aug 21 16:16:10 2006 +0000
@@ -90,16 +90,13 @@
 	pa->friendly = g_strdup(friendly);
 	pa->gc = gc;
 
-	if (friendly != NULL)
-	{
+	if (friendly != NULL){
 		msg = g_strdup_printf(
 				   _("The user %s (%s) wants to add %s to his or her "
 					 "buddy list."),
 				   passport, friendly,
 				   gaim_account_get_username(gc->account));
-	}
-	else
-	{
+	}else{
 		msg = g_strdup_printf(
 				   _("The user %s wants to add %s to his or "
 					 "her buddy list."),