Mercurial > pidgin
diff libfaim/aim_rxqueue.c @ 279:501e09c51cbc
[gaim-migrate @ 289]
Updates to libfaim -> updates to gaim.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Mon, 29 May 2000 20:30:48 +0000 |
parents | 6ced2f1c8b24 |
children | 0f14e6d8a51b |
line wrap: on
line diff
--- a/libfaim/aim_rxqueue.c Mon May 29 00:56:37 2000 +0000 +++ b/libfaim/aim_rxqueue.c Mon May 29 20:30:48 2000 +0000 @@ -31,10 +31,13 @@ * 2 short -- Sequence number * 4 short -- Number of data bytes that follow. */ + faim_mutex_lock(&conn->active); if (read(conn->fd, generic, 6) < 6){ aim_conn_close(conn); + faim_mutex_unlock(&conn->active); return -1; } + faim_mutex_unlock(&conn->active); /* * This shouldn't happen unless the socket breaks, the server breaks, @@ -72,12 +75,15 @@ } /* read the data portion of the packet */ + faim_mutex_lock(&conn->active); if (read(conn->fd, newrx->data, newrx->commandlen) < newrx->commandlen){ free(newrx->data); free(newrx); aim_conn_close(conn); + faim_mutex_unlock(&conn->active); return -1; } + faim_mutex_unlock(&conn->active); newrx->conn = conn;