diff options
author | Ka-Hing Cheung <khc@pidgin.im> | 2007-10-24 02:48:32 +0000 |
---|---|---|
committer | Ka-Hing Cheung <khc@pidgin.im> | 2007-10-24 02:48:32 +0000 |
commit | 77113341356830e60814d8fb1b882b447c6aa2f3 (patch) | |
tree | 4194f9af7ede3ff11fcb1e45931e3b3074c727d3 /libpurple/protocols/msn/soap.c | |
parent | 8ac33102ba08c5f679af8d287c89ada500fb9e49 (diff) | |
parent | 71afd41d3f0a2261479e098d63aa36e5aea6dbcd (diff) | |
download | pidgin-77113341356830e60814d8fb1b882b447c6aa2f3.tar.gz |
propagate from branch 'im.pidgin.pidgin' (head 5e7866d800e8121103c907ef2ce90f46ea51d758)
to branch 'im.pidgin.cpw.khc.msnp14.soap' (head 7c3149f4b0711653da92a6bc1a1745ea71e85f36)
Diffstat (limited to 'libpurple/protocols/msn/soap.c')
-rw-r--r-- | libpurple/protocols/msn/soap.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/libpurple/protocols/msn/soap.c b/libpurple/protocols/msn/soap.c index 482cbe050a..b955936398 100644 --- a/libpurple/protocols/msn/soap.c +++ b/libpurple/protocols/msn/soap.c @@ -679,6 +679,8 @@ msn_soap_write(MsnSoapConn * soapconn, char *write_buf, MsnSoapWrittenCbFunction msn_soap_set_process_step(soapconn, MSN_SOAP_PROCESSING); + /* Ideally this wouldn't ever be necessary, but i believe that it is leaking the previous value */ + g_free(soapconn->write_buf); soapconn->write_buf = write_buf; soapconn->written_len = 0; soapconn->written_cb = written_cb; @@ -822,7 +824,6 @@ msn_soap_post(MsnSoapConn *soapconn, MsnSoapReq *request) void msn_soap_post_request(MsnSoapConn *soapconn, MsnSoapReq *request) { - char * soap_head = NULL; char * request_str = NULL; #ifdef MSN_SOAP_DEBUG #if !defined(_WIN32) @@ -832,7 +833,7 @@ msn_soap_post_request(MsnSoapConn *soapconn, MsnSoapReq *request) #endif msn_soap_set_process_step(soapconn, MSN_SOAP_PROCESSING); - soap_head = g_strdup_printf( + request_str = g_strdup_printf( "POST %s HTTP/1.1\r\n" "SOAPAction: %s\r\n" "Content-Type:text/xml; charset=utf-8\r\n" @@ -842,20 +843,21 @@ msn_soap_post_request(MsnSoapConn *soapconn, MsnSoapReq *request) "Host: %s\r\n" "Content-Length: %" G_GSIZE_FORMAT "\r\n" "Connection: Keep-Alive\r\n" - "Cache-Control: no-cache\r\n\r\n", + "Cache-Control: no-cache\r\n\r\n" + "%s", request->login_path, request->soap_action, soapconn->session->passport_info.mspauth, request->login_host, - strlen(request->body) + strlen(request->body), + request->body ); - request_str = g_strdup_printf("%s%s", soap_head, request->body); #if defined(MSN_SOAP_DEBUG) && !defined(_WIN32) node = xmlnode_from_str(request->body, -1); if (node != NULL) { char *formattedstr = xmlnode_to_formatted_str(node, NULL); - purple_debug_info("MSN SOAP","Posting request to SOAP server:\n%s%s\n",soap_head, formattedstr); + purple_debug_info("MSN SOAP","Posting request to SOAP server:\n%s%s\n",request_str, formattedstr); g_free(formattedstr); xmlnode_free(node); } @@ -863,7 +865,6 @@ msn_soap_post_request(MsnSoapConn *soapconn, MsnSoapReq *request) purple_debug_info("MSN SOAP","Failed to parse SOAP request being sent:\n%s\n", request_str); #endif - g_free(soap_head); /*free read buffer*/ // msn_soap_free_read_buf(soapconn); /*post it to server*/ |