comparison libpurple/protocols/msn/servconn.c @ 20453:69febfa6d307

propagate from branch 'im.pidgin.pidgin' (head d3e5a5add3f39caa08b46c83177328e51c2d961a) to branch 'im.pidgin.cpw.khc.msnp14' (head a8f6c999b039b4097aa70cd8d2597f3127615435)
author Carlos Silva <typ0@pidgin.im>
date Sat, 16 Jun 2007 04:00:32 +0000
parents f905fa3bd56e 5c0f2eab43d9
children ef2e720f1b8f
comparison
equal deleted inserted replaced
20452:5c34a0a3c362 20453:69febfa6d307
193 servconn->inpa = purple_input_add(servconn->fd, PURPLE_INPUT_READ, 193 servconn->inpa = purple_input_add(servconn->fd, PURPLE_INPUT_READ,
194 read_cb, data); 194 read_cb, data);
195 } 195 }
196 else 196 else
197 { 197 {
198 purple_debug_error("msn", "Connection error: %s\n", error_message);
198 msn_servconn_got_error(servconn, MSN_SERVCONN_ERROR_CONNECT); 199 msn_servconn_got_error(servconn, MSN_SERVCONN_ERROR_CONNECT);
199 } 200 }
200 } 201 }
201 202
202 gboolean 203 gboolean
351 errno = EAGAIN; 352 errno = EAGAIN;
352 } 353 }
353 354
354 if (ret < 0 && errno == EAGAIN) 355 if (ret < 0 && errno == EAGAIN)
355 ret = 0; 356 ret = 0;
356 if (ret < len) { 357 if (ret >= 0 && ret < len) {
357 if (servconn->tx_handler == -1) 358 if (servconn->tx_handler == -1)
358 servconn->tx_handler = purple_input_add( 359 servconn->tx_handler = purple_input_add(
359 servconn->fd, PURPLE_INPUT_WRITE, 360 servconn->fd, PURPLE_INPUT_WRITE,
360 servconn_write_cb, servconn); 361 servconn_write_cb, servconn);
361 purple_circ_buffer_append(servconn->tx_buf, buf + ret, 362 purple_circ_buffer_append(servconn->tx_buf, buf + ret,