comparison 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
comparison
equal deleted inserted replaced
10402:3d2dd0ed368d 10403:e5455f1dc9b6
123 static void 123 static void
124 connect_cb(gpointer data, gint source, GaimInputCondition cond) 124 connect_cb(gpointer data, gint source, GaimInputCondition cond)
125 { 125 {
126 MsnServConn *servconn = data; 126 MsnServConn *servconn = data;
127 127
128 servconn->processing = FALSE;
129
130 if (servconn->wasted)
131 {
132 msn_servconn_destroy(servconn);
133 return;
134 }
135
128 servconn->fd = source; 136 servconn->fd = source;
129 137
130 if (source > 0) 138 if (source > 0)
131 { 139 {
140 servconn->connected = TRUE;
141 servconn->cmdproc->ready = TRUE;
142
132 /* Someone wants to know we connected. */ 143 /* Someone wants to know we connected. */
133 servconn->connect_cb(servconn); 144 servconn->connect_cb(servconn);
134 servconn->inpa = gaim_input_add(servconn->fd, GAIM_INPUT_READ, 145 servconn->inpa = gaim_input_add(servconn->fd, GAIM_INPUT_READ,
135 read_cb, data); 146 read_cb, data);
136 } 147 }
167 r = gaim_proxy_connect(session->account, host, port, connect_cb, 178 r = gaim_proxy_connect(session->account, host, port, connect_cb,
168 servconn); 179 servconn);
169 180
170 if (r == 0) 181 if (r == 0)
171 { 182 {
172 servconn->connected = TRUE; 183 servconn->processing = TRUE;
173 servconn->cmdproc->ready = TRUE;
174 return TRUE; 184 return TRUE;
175 } 185 }
176 else 186 else
177 return FALSE; 187 return FALSE;
178 } 188 }
204 214
205 if (servconn->http_data->timer) 215 if (servconn->http_data->timer)
206 gaim_timeout_remove(servconn->http_data->timer); 216 gaim_timeout_remove(servconn->http_data->timer);
207 } 217 }
208 218
219 servconn->rx_buf = NULL;
209 servconn->rx_len = 0; 220 servconn->rx_len = 0;
210 servconn->payload_len = 0; 221 servconn->payload_len = 0;
211 222
212 servconn->connected = FALSE; 223 servconn->connected = FALSE;
213 servconn->cmdproc->ready = FALSE; 224 servconn->cmdproc->ready = FALSE;