changeset 19768:78fea5515221

[gaim-migrate @ 16956] middle stage of multiple soap request why always read 0 bytes? committed by MaYuan<mayuan2006@gmail.com> committer: Ethan Blanton <elb@pidgin.im>
author Ma Yuan <mayuan2006@gmail.com>
date Mon, 21 Aug 2006 18:58:31 +0000
parents 6bc69cd68d3c
children bffd1b96207c
files src/protocols/msn/oim.c src/protocols/msn/soap.c
diffstat 2 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/msn/oim.c	Mon Aug 21 17:40:07 2006 +0000
+++ b/src/protocols/msn/oim.c	Mon Aug 21 18:58:31 2006 +0000
@@ -196,6 +196,7 @@
 	/*we need to process the read message!*/
 	/*get next single Offline Message*/
 //	oim->oim_list = g_list_remove(oim->oim_list, oim->oim_list->data);
+	msn_soap_post_head_request(soapconn);
 }
 
 static void
--- a/src/protocols/msn/soap.c	Mon Aug 21 17:40:07 2006 +0000
+++ b/src/protocols/msn/soap.c	Mon Aug 21 18:58:31 2006 +0000
@@ -26,6 +26,9 @@
 #include "msn.h"
 #include "soap.h"
 
+/*local function prototype*/
+void msn_soap_set_process_step(MsnSoapConn *soapconn, MsnSoapStep step);
+
 /*setup the soap process step*/
 void
 msn_soap_set_process_step(MsnSoapConn *soapconn, MsnSoapStep step)
@@ -187,7 +190,6 @@
 msn_soap_read(MsnSoapConn *soapconn)
 {
 	gssize len,requested_len;
-	gssize total_len = 0;
 	char temp_buf[MSN_SOAP_READ_BUFF_SIZE];
 
 //	requested_len = (soapconn->need_to_read > 0) ? soapconn->need_to_read : MSN_SOAP_READ_BUFF_SIZE;
@@ -198,7 +200,6 @@
 		len = read(soapconn->fd, temp_buf,requested_len);
 	}
 	if(len >0){
-		total_len += len;
 		soapconn->read_buf = g_realloc(soapconn->read_buf,
 						soapconn->read_len + len + 1);
 //		strncpy(soapconn->read_buf + soapconn->read_len, temp_buf, len);
@@ -206,9 +207,9 @@
 		soapconn->read_len += len;
 		soapconn->read_buf[soapconn->read_len] = '\0';
 	}
-	gaim_debug_info("MaYuan","++soap ssl read:{%d}\n",total_len);
+	gaim_debug_info("MaYuan","++soap ssl read:{%d}\n",len);
 //	gaim_debug_info("MaYuan","nexus ssl read:{%s}\n",soapconn->read_buf);
-	return total_len;
+	return len;
 }
 
 /*read the whole SOAP server response*/
@@ -534,7 +535,7 @@
 	char * soap_head = NULL;
 	char * request_str = NULL;
 
-	gaim_debug_info("MaYuan","msn_soap_post()...\n");
+	gaim_debug_info("MaYuan","msn_soap_post_request()...\n");
 	msn_soap_set_process_step(soapconn,MSN_SOAP_PROCESSING);
 	soap_head = g_strdup_printf(
 					"POST %s HTTP/1.1\r\n"