diff libpurple/protocols/msn/soap.c @ 31538:b3a54678e51a

Using conn->current_request looks a bit iffy here. And even if it wasn't, this looks nicer.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Tue, 04 Jan 2011 23:43:40 +0000
parents ce1bd217ce3d
children bc27c845a48f
line wrap: on
line diff
--- a/libpurple/protocols/msn/soap.c	Tue Jan 04 23:36:56 2011 +0000
+++ b/libpurple/protocols/msn/soap.c	Tue Jan 04 23:43:40 2011 +0000
@@ -281,12 +281,13 @@
 	char *path;
 
 	if (purple_url_parse(url, &host, NULL, &path, NULL, NULL)) {
-		msn_soap_message_send_internal(conn->session, conn->current_request->message,
-			host, path, conn->current_request->secure,
-			conn->current_request->cb, conn->current_request->cb_data, TRUE);
+		MsnSoapRequest *req = conn->current_request;
+		conn->current_request = NULL;
 
-		msn_soap_request_destroy(conn->current_request, TRUE);
-		conn->current_request = NULL;
+		msn_soap_message_send_internal(conn->session, req->message, host, path,
+			req->secure, req->cb, req->cb_data, TRUE);
+
+		msn_soap_request_destroy(req, TRUE);
 
 		g_free(host);
 		g_free(path);