comparison libpurple/protocols/oscar/peer_proxy.c @ 17448:648551e3243a

Only check for EAGAIN if send returns -1, not when it returns 0
author Mark Doliner <mark@kingant.net>
date Sun, 03 Jun 2007 19:04:22 +0000
parents 32c366eeeb99
children 44b4e8bd759b
comparison
equal deleted inserted replaced
17447:3522a4cda52f 17448:648551e3243a
222 peer_connection_trynext(conn); 222 peer_connection_trynext(conn);
223 return; 223 return;
224 } 224 }
225 225
226 /* If there was an error then close the connection */ 226 /* If there was an error then close the connection */
227 if (read == -1) 227 if (read < 0)
228 { 228 {
229 if ((errno == EAGAIN) || (errno == EWOULDBLOCK)) 229 if ((errno == EAGAIN) || (errno == EWOULDBLOCK))
230 /* No worries */ 230 /* No worries */
231 return; 231 return;
232 232
283 conn->frame = NULL; 283 conn->frame = NULL;
284 peer_connection_trynext(conn); 284 peer_connection_trynext(conn);
285 return; 285 return;
286 } 286 }
287 287
288 if (read == -1) 288 /* If there was an error then close the connection */
289 if (read < 0)
289 { 290 {
290 if ((errno == EAGAIN) || (errno == EWOULDBLOCK)) 291 if ((errno == EAGAIN) || (errno == EWOULDBLOCK))
291 /* No worries */ 292 /* No worries */
292 return; 293 return;
293 294