Mercurial > pidgin
comparison libfaim/aim_rxqueue.c @ 829:9a123b171f46
[gaim-migrate @ 839]
yay. i have a secret. but basically this should fix most outstanding libfaim issues in gaim.
committer: Tailor Script <tailor@pidgin.im>
| author | Eric Warmenhoven <eric@warmenhoven.org> |
|---|---|
| date | Sat, 02 Sep 2000 02:41:57 +0000 |
| parents | 6e318907bcce |
| children | 88f8f98de02d |
comparison
equal
deleted
inserted
replaced
| 828:4c71c0e7f04e | 829:9a123b171f46 |
|---|---|
| 39 * 1 char -- Channel ID. Usually 2 -- 1 and 4 are used during login. | 39 * 1 char -- Channel ID. Usually 2 -- 1 and 4 are used during login. |
| 40 * 2 short -- Sequence number | 40 * 2 short -- Sequence number |
| 41 * 4 short -- Number of data bytes that follow. | 41 * 4 short -- Number of data bytes that follow. |
| 42 */ | 42 */ |
| 43 faim_mutex_lock(&conn->active); | 43 faim_mutex_lock(&conn->active); |
| 44 if (read(conn->fd, generic, 6) < 6){ | 44 if (recv(conn->fd, generic, 6, MSG_WAITALL) < 6){ |
| 45 printf("faim: flap: read underflow (header)\n"); | |
| 45 aim_conn_close(conn); | 46 aim_conn_close(conn); |
| 46 faim_mutex_unlock(&conn->active); | 47 faim_mutex_unlock(&conn->active); |
| 47 return -1; | 48 return -1; |
| 48 } | 49 } |
| 49 | 50 |
| 87 faim_mutex_unlock(&conn->active); | 88 faim_mutex_unlock(&conn->active); |
| 88 return -1; | 89 return -1; |
| 89 } | 90 } |
| 90 | 91 |
| 91 /* read the data portion of the packet */ | 92 /* read the data portion of the packet */ |
| 92 if (read(conn->fd, newrx->data, newrx->commandlen) < newrx->commandlen){ | 93 if (recv(conn->fd, newrx->data, newrx->commandlen, MSG_WAITALL) < newrx->commandlen){ |
| 94 printf("faim: flap: read underflow (payload)\n"); | |
| 93 free(newrx->data); | 95 free(newrx->data); |
| 94 free(newrx); | 96 free(newrx); |
| 95 aim_conn_close(conn); | 97 aim_conn_close(conn); |
| 96 faim_mutex_unlock(&conn->active); | 98 faim_mutex_unlock(&conn->active); |
| 97 return -1; | 99 return -1; |
