changeset 19810:da1075366756

[gaim-migrate @ 16885] middle stage of debugging multiple-SOAP request read 0 from soap Reply comitted by MaYuan<mayuan2006@gmail.com> committer: Ethan Blanton <elb@pidgin.im>
author Ma Yuan <mayuan2006@gmail.com>
date Sat, 19 Aug 2006 16:13:55 +0000
parents b488205ad0bc
children 4c7aa3b07f42
files src/protocols/msn/contact.c src/protocols/msn/msg.c src/protocols/msn/nexus.c src/protocols/msn/oim.c src/protocols/msn/soap.c src/protocols/msn/switchboard.c src/protocols/msn/userlist.c
diffstat 7 files changed, 23 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/msn/contact.c	Sat Aug 19 14:12:41 2006 +0000
+++ b/src/protocols/msn/contact.c	Sat Aug 19 16:13:55 2006 +0000
@@ -206,7 +206,7 @@
 
 	gaim_debug_info("MaYuan","finish contact written\n");
 	soapconn->read_cb = msn_get_contact_list_cb;
-	msn_soap_read_cb(data,source,cond);
+//	msn_soap_read_cb(data,source,cond);
 }
 
 void
@@ -343,7 +343,7 @@
 
 		displayName = xmlnode_get_child(contactInfo,"displayName");
 		if(displayName == NULL)
-			Name = "";
+			Name = passport;
 		else
 			Name =xmlnode_get_data(displayName);	
 
@@ -430,7 +430,7 @@
 
 	gaim_debug_info("MaYuan","finish contact written\n");
 	soapconn->read_cb = msn_get_address_cb;
-	msn_soap_read_cb(data,source,cond);
+//	msn_soap_read_cb(data,source,cond);
 }
 
 /*get the address book*/
@@ -462,7 +462,7 @@
 
 	gaim_debug_info("MaYuan","finish unblock written\n");
 	soapconn->read_cb = msn_add_contact_read_cb;
-	msn_soap_read_cb(data,source,cond);
+//	msn_soap_read_cb(data,source,cond);
 }
 
 /*add a Contact */
@@ -511,7 +511,7 @@
 
 	gaim_debug_info("MaYuan","delete contact written\n");
 	soapconn->read_cb = msn_delete_contact_read_cb;
-	msn_soap_read_cb(data,source,cond);
+//	msn_soap_read_cb(data,source,cond);
 }
 
 /*delete a Contact*/
@@ -550,7 +550,7 @@
 
 	gaim_debug_info("MaYuan","finish unblock written\n");
 	soapconn->read_cb = msn_block_read_cb;
-	msn_soap_read_cb(data,source,cond);
+//	msn_soap_read_cb(data,source,cond);
 }
 
 /*block a Contact*/
@@ -586,7 +586,7 @@
 
 	gaim_debug_info("MaYuan","finish unblock written\n");
 	soapconn->read_cb = msn_unblock_read_cb;
-	msn_soap_read_cb(data,source,cond);
+//	msn_soap_read_cb(data,source,cond);
 }
 
 /*unblock a contact*/
@@ -623,7 +623,7 @@
 
 	gaim_debug_info("MaYuan","finish Group written\n");
 	soapconn->read_cb = msn_gleams_read_cb;
-	msn_soap_read_cb(data,source,cond);
+//	msn_soap_read_cb(data,source,cond);
 }
 
 /*get the gleams info*/
@@ -658,7 +658,7 @@
 
 	gaim_debug_info("MaYuan","finish Group written\n");
 	soapconn->read_cb = msn_group_read_cb;
-	msn_soap_read_cb(data,source,cond);
+//	msn_soap_read_cb(data,source,cond);
 }
 
 /*add group*/
--- a/src/protocols/msn/msg.c	Sat Aug 19 14:12:41 2006 +0000
+++ b/src/protocols/msn/msg.c	Sat Aug 19 16:13:55 2006 +0000
@@ -121,7 +121,7 @@
 	char *message_cr;
 
 	msg = msn_message_new(MSN_MSG_TEXT);
-//	msn_message_set_attr(msg, "User-Agent", "Gaim/" VERSION);
+	msn_message_set_attr(msg, "User-Agent", "Gaim/" VERSION);
 	msn_message_set_content_type(msg, "text/plain");
 	msn_message_set_charset(msg, "UTF-8");
 	msn_message_set_flag(msg, 'A');
--- a/src/protocols/msn/nexus.c	Sat Aug 19 14:12:41 2006 +0000
+++ b/src/protocols/msn/nexus.c	Sat Aug 19 16:13:55 2006 +0000
@@ -151,7 +151,7 @@
 	MsnSoapConn * soapconn = data;	
 
 	soapconn->read_cb = nexus_login_read_cb;
-	msn_soap_read_cb(data,source,cond);
+//	msn_soap_read_cb(data,source,cond);
 }
 
 
--- a/src/protocols/msn/oim.c	Sat Aug 19 14:12:41 2006 +0000
+++ b/src/protocols/msn/oim.c	Sat Aug 19 16:13:55 2006 +0000
@@ -104,7 +104,7 @@
 	MsnSoapConn * soapconn = data;	
 
 	soapconn->read_cb = msn_oim_send_read_cb;
-	msn_soap_read_cb(data,source,cond);
+//	msn_soap_read_cb(data,source,cond);
 }
 
 /*pose single message to oim server*/
@@ -204,7 +204,7 @@
 	MsnSoapConn * soapconn = data;	
 
 	soapconn->read_cb = msn_oim_get_read_cb;
-	msn_soap_read_cb(data,source,cond);
+//	msn_soap_read_cb(data,source,cond);
 }
 
 /*parse the oim XML data*/
--- a/src/protocols/msn/soap.c	Sat Aug 19 14:12:41 2006 +0000
+++ b/src/protocols/msn/soap.c	Sat Aug 19 16:13:55 2006 +0000
@@ -352,17 +352,11 @@
 			}
 			/*clear the read buffer*/
 			msn_soap_free_read_buf(soapconn);
-
+#if 1
+//			msn_soap_close(soapconn);
+#endif
 			/*Process the next queued SOAP request*/
 			msn_soap_post_head_request(soapconn);
-
-#if 0
-	/*remove the read handler*/
-	gaim_input_remove(soapconn->input_handler);
-	soapconn->input_handler = -1;
-	//	gaim_ssl_close(soapconn->gsc);
-	//	soapconn->gsc = NULL;
-#endif
 	}
 	return;
 }
@@ -437,6 +431,8 @@
 	if(soapconn->written_cb != NULL){
 		soapconn->written_cb(soapconn, source, 0);
 	}
+	/*maybe we need to read the input?*/
+	msn_soap_read_cb(soapconn,source,0);
 }
 
 /*write the buffer to SOAP connection*/
@@ -495,6 +491,8 @@
 void
 msn_soap_post_head_request(MsnSoapConn *soapconn)
 {
+	g_return_if_fail(soapconn->soap_queue != NULL);
+
 	if(!g_queue_is_empty(soapconn->soap_queue)){
 		MsnSoapReq *request;
 		if((request = g_queue_pop_head(soapconn->soap_queue)) != NULL){
--- a/src/protocols/msn/switchboard.c	Sat Aug 19 14:12:41 2006 +0000
+++ b/src/protocols/msn/switchboard.c	Sat Aug 19 16:13:55 2006 +0000
@@ -707,8 +707,8 @@
 
 	process_queue(swboard);
 
-//	if (!session->http_method)
-//		send_clientcaps(swboard);
+	if (!session->http_method)
+		send_clientcaps(swboard);
 
 	if (swboard->closed)
 		msn_switchboard_close(swboard);
--- a/src/protocols/msn/userlist.c	Sat Aug 19 14:12:41 2006 +0000
+++ b/src/protocols/msn/userlist.c	Sat Aug 19 16:13:55 2006 +0000
@@ -458,6 +458,7 @@
 		user = msn_user_new(userlist, passport, userName);
 		msn_userlist_add_user(userlist, user);
 	}
+	msn_user_set_store_name(user, userName);
 	return user;
 }