Mercurial > pidgin.yaz
diff libpurple/protocols/msn/soap2.c @ 23506:d756a0477c06
propagate from branch 'im.pidgin.pidgin' (head e1c49c9ec5c6869ed9813feccd8ee41d2ca40f35)
to branch 'im.pidgin.pidgin.khc.msnp15' (head cee4156a103d7f7b90a8d4e3a3ebf10950baf0aa)
author | Ka-Hing Cheung <khc@hxbc.us> |
---|---|
date | Wed, 14 May 2008 04:38:26 +0000 |
parents | bca58b00afab 84807b5e60fa |
children | 0a762c2271ac |
line wrap: on
line diff
--- a/libpurple/protocols/msn/soap2.c Tue Mar 18 05:36:30 2008 +0000 +++ b/libpurple/protocols/msn/soap2.c Wed May 14 04:38:26 2008 +0000 @@ -33,7 +33,9 @@ #include "xmlnode.h" #include <glib.h> +#if !defined(_WIN32) || !defined(_WINERROR_) #include <error.h> +#endif #define SOAP_TIMEOUT (5 * 60) @@ -264,7 +266,7 @@ static void msn_soap_read_cb(gpointer data, gint fd, PurpleInputCondition cond) { - MsnSoapConnection *conn = data; + MsnSoapConnection *conn = data; int count = 0, cnt; char buf[8192]; char *linebreak; @@ -385,7 +387,7 @@ } if (!handled && conn->headers_done) { - if (conn->buf->len - conn->handled_len >= + if (conn->buf->len - conn->handled_len >= conn->body_len) { xmlnode *node = xmlnode_from_str(cursor, conn->body_len); @@ -397,8 +399,11 @@ conn->message = NULL; message->xml = node; - if (!msn_soap_handle_body(conn, message)) + if (!msn_soap_handle_body(conn, message)) { + msn_soap_message_destroy(message); return; + } + msn_soap_message_destroy(message); } msn_soap_connection_handle_next(conn); @@ -503,7 +508,7 @@ msn_soap_write_cb(conn, conn->ssl->fd, PURPLE_INPUT_WRITE); g_free(body); - } + } } return FALSE; @@ -638,12 +643,12 @@ } void -msn_soap_message_add_header(MsnSoapMessage *req, +msn_soap_message_add_header(MsnSoapMessage *message, const char *name, const char *value) { char *header = g_strdup_printf("%s: %s\r\n", name, value); - req->headers = g_slist_prepend(req->headers, header); + message->headers = g_slist_prepend(message->headers, header); } static void