Mercurial > pidgin
diff 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 |
line wrap: on
line diff
--- a/libfaim/aim_rxqueue.c Fri Sep 01 23:45:43 2000 +0000 +++ b/libfaim/aim_rxqueue.c Sat Sep 02 02:41:57 2000 +0000 @@ -41,7 +41,8 @@ * 4 short -- Number of data bytes that follow. */ faim_mutex_lock(&conn->active); - if (read(conn->fd, generic, 6) < 6){ + if (recv(conn->fd, generic, 6, MSG_WAITALL) < 6){ + printf("faim: flap: read underflow (header)\n"); aim_conn_close(conn); faim_mutex_unlock(&conn->active); return -1; @@ -89,7 +90,8 @@ } /* read the data portion of the packet */ - if (read(conn->fd, newrx->data, newrx->commandlen) < newrx->commandlen){ + if (recv(conn->fd, newrx->data, newrx->commandlen, MSG_WAITALL) < newrx->commandlen){ + printf("faim: flap: read underflow (payload)\n"); free(newrx->data); free(newrx); aim_conn_close(conn);