diff src/protocols/msn/servconn.c @ 10403:e5455f1dc9b6

[gaim-migrate @ 11648] This is "Yet another MSN fix" from Felipe, it actually turned into "Several MSN fixes", see bug 1088651 for the details. committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Thu, 23 Dec 2004 20:13:54 +0000
parents a7b2fd5efcf2
children 6be6da69d603
line wrap: on
line diff
--- a/src/protocols/msn/servconn.c	Wed Dec 22 23:45:37 2004 +0000
+++ b/src/protocols/msn/servconn.c	Thu Dec 23 20:13:54 2004 +0000
@@ -125,10 +125,21 @@
 {
 	MsnServConn *servconn = data;
 
+	servconn->processing = FALSE;
+
+	if (servconn->wasted)
+	{
+		msn_servconn_destroy(servconn);
+		return;
+	}
+
 	servconn->fd = source;
 
 	if (source > 0)
 	{
+		servconn->connected = TRUE;
+		servconn->cmdproc->ready = TRUE;
+
 		/* Someone wants to know we connected. */
 		servconn->connect_cb(servconn);
 		servconn->inpa = gaim_input_add(servconn->fd, GAIM_INPUT_READ,
@@ -169,8 +180,7 @@
 
 	if (r == 0)
 	{
-		servconn->connected = TRUE;
-		servconn->cmdproc->ready = TRUE;
+		servconn->processing = TRUE;
 		return TRUE;
 	}
 	else
@@ -206,6 +216,7 @@
 			gaim_timeout_remove(servconn->http_data->timer);
 	}
 
+	servconn->rx_buf = NULL;
 	servconn->rx_len = 0;
 	servconn->payload_len = 0;