Mercurial > pidgin.yaz
comparison src/protocols/msn/httpconn.c @ 10533:ace8cd0de6ea
[gaim-migrate @ 11862]
Some minor MSN reorganization from Felipe and a bunch of MSN chat related fixes
and improvements from me.
committer: Tailor Script <tailor@pidgin.im>
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Thu, 20 Jan 2005 16:37:14 +0000 |
parents | 1a97d5e88d12 |
children | 052ef28a0695 |
comparison
equal
deleted
inserted
replaced
10532:8f2b74c5aa24 | 10533:ace8cd0de6ea |
---|---|
281 | 281 |
282 if (len <= 0) | 282 if (len <= 0) |
283 { | 283 { |
284 gaim_debug_error("msn", "HTTP: Read error\n"); | 284 gaim_debug_error("msn", "HTTP: Read error\n"); |
285 msn_servconn_got_error(httpconn->servconn, MSN_SERVCONN_ERROR_READ); | 285 msn_servconn_got_error(httpconn->servconn, MSN_SERVCONN_ERROR_READ); |
286 msn_httpconn_disconnect(httpconn); | |
287 | 286 |
288 return; | 287 return; |
289 } | 288 } |
290 | 289 |
291 buf[len] = '\0'; | 290 buf[len] = '\0'; |
308 | 307 |
309 if (error) | 308 if (error) |
310 { | 309 { |
311 gaim_debug_error("msn", "HTTP: Special error\n"); | 310 gaim_debug_error("msn", "HTTP: Special error\n"); |
312 msn_servconn_got_error(httpconn->servconn, MSN_SERVCONN_ERROR_READ); | 311 msn_servconn_got_error(httpconn->servconn, MSN_SERVCONN_ERROR_READ); |
313 msn_httpconn_disconnect(httpconn); | |
314 | 312 |
315 return; | 313 return; |
316 } | 314 } |
315 | |
316 if (httpconn->rx_buf != NULL) | |
317 g_free(httpconn->rx_buf); | |
318 httpconn->rx_buf = NULL; | |
319 httpconn->rx_len = 0; | |
317 | 320 |
318 if (result_len == 0) | 321 if (result_len == 0) |
319 { | 322 { |
320 /* Nothing to do here */ | 323 /* Nothing to do here */ |
321 #if 0 | 324 #if 0 |
322 gaim_debug_info("msn", "HTTP: nothing to do here\n"); | 325 gaim_debug_info("msn", "HTTP: nothing to do here\n"); |
323 #endif | 326 #endif |
324 g_free(result_msg); | 327 g_free(result_msg); |
325 g_free(httpconn->rx_buf); | |
326 httpconn->rx_buf = NULL; | |
327 httpconn->rx_len = 0; | |
328 return; | 328 return; |
329 } | 329 } |
330 | 330 |
331 g_free(httpconn->rx_buf); | 331 if (servconn->rx_buf != NULL) |
332 httpconn->rx_buf = NULL; | 332 g_free(servconn->rx_buf); |
333 httpconn->rx_len = 0; | |
334 | |
335 g_free(servconn->rx_buf); | |
336 servconn->rx_buf = result_msg; | 333 servconn->rx_buf = result_msg; |
337 servconn->rx_len = result_len; | 334 servconn->rx_len = result_len; |
338 | 335 |
339 end = old_rx_buf = servconn->rx_buf; | 336 end = old_rx_buf = servconn->rx_buf; |
340 | 337 |
700 /* It's going to die. */ | 697 /* It's going to die. */ |
701 /* poor thing */ | 698 /* poor thing */ |
702 | 699 |
703 servconn = httpconn->servconn; | 700 servconn = httpconn->servconn; |
704 | 701 |
705 if (servconn != NULL) | 702 /* I'll be honest, I don't fully understand all this, but this |
706 servconn->wasted = TRUE; | 703 * causes crashes, Stu. */ |
704 /* if (servconn != NULL) | |
705 servconn->wasted = TRUE; */ | |
707 | 706 |
708 g_free(full_session_id); | 707 g_free(full_session_id); |
709 g_free(session_id); | 708 g_free(session_id); |
710 g_free(gw_ip); | 709 g_free(gw_ip); |
711 } | 710 } |