comparison src/protocols/msn/soap.c @ 19822:509383ef25f8

[gaim-migrate @ 17015] delete oim integration ok committed by MaYuan<mayuan2006@gmail.com> committer: Ethan Blanton <elb@pidgin.im>
author Ma Yuan <mayuan2006@gmail.com>
date Thu, 24 Aug 2006 16:38:30 +0000
parents cf0611260c6b
children 1b6c631012d9
comparison
equal deleted inserted replaced
19821:0af038b3b7fe 19822:509383ef25f8
139 }else{ 139 }else{
140 } 140 }
141 msn_soap_set_process_step(soapconn,MSN_SOAP_UNCONNECTED); 141 msn_soap_set_process_step(soapconn,MSN_SOAP_UNCONNECTED);
142 } 142 }
143 143
144 /*clean the unhandled SOAP request*/
145 void
146 msn_soap_clean_unhandled_request(MsnSoapConn *soapconn)
147 {
148 MsnSoapReq *request;
149
150 g_return_if_fail(soapconn != NULL);
151
152 while ((request = g_queue_pop_head(soapconn->soap_queue)) != NULL){
153 msn_soap_request_free(request);
154 }
155 }
156
144 /*destroy the soap connection*/ 157 /*destroy the soap connection*/
145 void 158 void
146 msn_soap_destroy(MsnSoapConn *soapconn) 159 msn_soap_destroy(MsnSoapConn *soapconn)
147 { 160 {
148 MsnSoapReq *request;
149
150 if(soapconn->login_host) 161 if(soapconn->login_host)
151 g_free(soapconn->login_host); 162 g_free(soapconn->login_host);
152 163
153 if(soapconn->login_path) 164 if(soapconn->login_path)
154 g_free(soapconn->login_path); 165 g_free(soapconn->login_path);
166 177
167 /*close ssl connection*/ 178 /*close ssl connection*/
168 msn_soap_close(soapconn); 179 msn_soap_close(soapconn);
169 180
170 /*process the unhandled soap request*/ 181 /*process the unhandled soap request*/
171 while ((request = g_queue_pop_head(soapconn->soap_queue)) != NULL){ 182 msn_soap_clean_unhandled_request(soapconn);
172 msn_soap_request_free(request); 183
173 }
174 g_queue_free(soapconn->soap_queue); 184 g_queue_free(soapconn->soap_queue);
175 g_free(soapconn); 185 g_free(soapconn);
176 } 186 }
177 187
178 /*check the soap is connected? 188 /*check the soap is connected?
549 "POST %s HTTP/1.1\r\n" 559 "POST %s HTTP/1.1\r\n"
550 "SOAPAction: %s\r\n" 560 "SOAPAction: %s\r\n"
551 "Content-Type:text/xml; charset=utf-8\r\n" 561 "Content-Type:text/xml; charset=utf-8\r\n"
552 "Cookie: MSPAuth=%s\r\n" 562 "Cookie: MSPAuth=%s\r\n"
553 "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)\r\n" 563 "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)\r\n"
554 "Accept: text/*\r\n" 564 "Accept: */*\r\n"
555 "Host: %s\r\n" 565 "Host: %s\r\n"
556 "Content-Length: %d\r\n" 566 "Content-Length: %d\r\n"
557 "Connection: Keep-Alive\r\n" 567 "Connection: Keep-Alive\r\n"
558 "Cache-Control: no-cache\r\n\r\n", 568 "Cache-Control: no-cache\r\n\r\n",
559 request->login_path, 569 request->login_path,