Mercurial > pidgin
comparison libpurple/protocols/msn/servconn.c @ 20477:9a2a4a0c0003
Add the possibility to create an Address Book, useful for newly registered MSN users.
When changing friendly name, send the new one to the SOAP server in the PRP msn command callback, with escaped html entity chars. Fixes #1294 .
Handle EBADF error sometimes received in SOAP server read callback (observed in win32).
Misc cleanups.
author | Carlos Silva <typ0@pidgin.im> |
---|---|
date | Tue, 07 Aug 2007 02:37:58 +0000 |
parents | ef2e720f1b8f |
children | 1754155051a4 |
comparison
equal
deleted
inserted
replaced
20476:fb52154f3c70 | 20477:9a2a4a0c0003 |
---|---|
388 servconn = data; | 388 servconn = data; |
389 session = servconn->session; | 389 session = servconn->session; |
390 | 390 |
391 len = read(servconn->fd, buf, sizeof(buf) - 1); | 391 len = read(servconn->fd, buf, sizeof(buf) - 1); |
392 | 392 |
393 if (len < 0 && errno == EAGAIN) | 393 if (len <= 0) { |
394 return; | 394 switch (errno) { |
395 else if (len <= 0) | 395 |
396 { | 396 case 0: |
397 purple_debug_error("msn", "servconn read error, len: %d error: %s\n", len, strerror(errno)); | 397 |
398 msn_servconn_got_error(servconn, MSN_SERVCONN_ERROR_READ); | 398 case EBADF: |
399 | 399 case EAGAIN: return; |
400 return; | 400 |
401 default: purple_debug_error("msn", "servconn read error," | |
402 "len: %d, errno: %d, error: %s\n", | |
403 len, errno, strerror(errno)); | |
404 msn_servconn_got_error(servconn, | |
405 MSN_SERVCONN_ERROR_READ); | |
406 return; | |
407 } | |
401 } | 408 } |
402 | 409 |
403 buf[len] = '\0'; | 410 buf[len] = '\0'; |
404 | 411 |
405 servconn->rx_buf = g_realloc(servconn->rx_buf, len + servconn->rx_len + 1); | 412 servconn->rx_buf = g_realloc(servconn->rx_buf, len + servconn->rx_len + 1); |