changeset 24330:3520b566ce25

Move a few lines to eliminate the need for the "wasted" variable here. I think this is simpler.
author Mark Doliner <mark@kingant.net>
date Wed, 12 Nov 2008 09:32:10 +0000
parents 6e4979001d6d
children 7e8175f9b009
files libpurple/protocols/msn/httpconn.c
diffstat 1 files changed, 3 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/httpconn.c	Wed Nov 12 09:10:29 2008 +0000
+++ b/libpurple/protocols/msn/httpconn.c	Wed Nov 12 09:32:10 2008 +0000
@@ -64,7 +64,6 @@
 	const char *body_start;
 	char *tmp;
 	size_t body_len = 0;
-	gboolean wasted = FALSE;
 
 	g_return_val_if_fail(httpconn != NULL, FALSE);
 	g_return_val_if_fail(buf      != NULL, FALSE);
@@ -217,15 +216,10 @@
 
 		g_free(tmp);
 
-		if ((session_action != NULL) && (strcmp(session_action, "close") == 0))
-			wasted = TRUE;
-
-		g_free(session_action);
-
 		t = strchr(full_session_id, '.');
 		session_id = g_strndup(full_session_id, t - full_session_id);
 
-		if (!wasted)
+		if (session_action == NULL || strcmp(session_action, "close") != 0)
 		{
 			g_free(httpconn->full_session_id);
 			httpconn->full_session_id = full_session_id;
@@ -254,6 +248,8 @@
 			g_free(session_id);
 			g_free(gw_ip);
 		}
+
+		g_free(session_action);
 	}
 
 	g_free(header);