comparison libfaim/aim_rxqueue.c @ 835:88f8f98de02d

[gaim-migrate @ 845] libfaim changes. should improve reliablity and stability. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Sun, 03 Sep 2000 23:22:05 +0000
parents 9a123b171f46
children 595ac7759563
comparison
equal deleted inserted replaced
834:bac7089491c1 835:88f8f98de02d
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 (recv(conn->fd, generic, 6, MSG_WAITALL) < 6){ 44 if (recv(conn->fd, generic, 6, MSG_WAITALL) < 6){
45 printf("faim: flap: read underflow (header)\n");
46 aim_conn_close(conn); 45 aim_conn_close(conn);
47 faim_mutex_unlock(&conn->active); 46 faim_mutex_unlock(&conn->active);
48 return -1; 47 return -1;
49 } 48 }
50 49
89 return -1; 88 return -1;
90 } 89 }
91 90
92 /* read the data portion of the packet */ 91 /* read the data portion of the packet */
93 if (recv(conn->fd, newrx->data, newrx->commandlen, MSG_WAITALL) < newrx->commandlen){ 92 if (recv(conn->fd, newrx->data, newrx->commandlen, MSG_WAITALL) < newrx->commandlen){
94 printf("faim: flap: read underflow (payload)\n");
95 free(newrx->data); 93 free(newrx->data);
96 free(newrx); 94 free(newrx);
97 aim_conn_close(conn); 95 aim_conn_close(conn);
98 faim_mutex_unlock(&conn->active); 96 faim_mutex_unlock(&conn->active);
99 return -1; 97 return -1;