comparison libpurple/protocols/msnp9/nexus.c @ 24808:98bbeed2481c

a patch from eperez that corrects EOF detection, Fixes #7726
author Ka-Hing Cheung <khc@hxbc.us>
date Thu, 18 Dec 2008 07:25:37 +0000
parents 1e7713b5e068
children
comparison
equal deleted inserted replaced
24807:a0b89076a163 24808:98bbeed2481c
166 166
167 len = msn_ssl_read(nexus); 167 len = msn_ssl_read(nexus);
168 168
169 if (len < 0 && errno == EAGAIN) 169 if (len < 0 && errno == EAGAIN)
170 return; 170 return;
171 else if (len < 0) { 171 else if (len <= 0) {
172 purple_input_remove(nexus->input_handler); 172 purple_input_remove(nexus->input_handler);
173 nexus->input_handler = 0; 173 nexus->input_handler = 0;
174 g_free(nexus->read_buf); 174 g_free(nexus->read_buf);
175 nexus->read_buf = NULL; 175 nexus->read_buf = NULL;
176 nexus->read_len = 0; 176 nexus->read_len = 0;
413 /* Get the PassportURLs line. */ 413 /* Get the PassportURLs line. */
414 len = msn_ssl_read(nexus); 414 len = msn_ssl_read(nexus);
415 415
416 if (len < 0 && errno == EAGAIN) 416 if (len < 0 && errno == EAGAIN)
417 return; 417 return;
418 else if (len < 0) { 418 else if (len <= 0) {
419 purple_input_remove(nexus->input_handler); 419 purple_input_remove(nexus->input_handler);
420 nexus->input_handler = 0; 420 nexus->input_handler = 0;
421 g_free(nexus->read_buf); 421 g_free(nexus->read_buf);
422 nexus->read_buf = NULL; 422 nexus->read_buf = NULL;
423 nexus->read_len = 0; 423 nexus->read_len = 0;