Changeset 2334 for trunk/libtransmission/net.c
- Timestamp:
- Jul 13, 2007, 1:34:14 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/net.c
r2328 r2334 375 375 } 376 376 377 int tr_netSend( int s, uint8_t * buf, int size ) 378 { 379 int ret; 380 381 ret = send( s, buf, size, 0 ); 382 if( ret < 0 ) 383 { 384 if( errno == ENOTCONN || errno == EAGAIN || errno == EWOULDBLOCK ) 385 { 386 ret = TR_NET_BLOCK; 387 } 388 else 389 { 390 ret = TR_NET_CLOSE; 391 } 392 } 393 394 return ret; 377 int 378 tr_netSend( int s, const void * buf, int size ) 379 { 380 const int ret = send( s, buf, size, 0 ); 381 if( ret >= 0 ) 382 return ret; 383 384 if( errno == ENOTCONN || errno == EAGAIN || errno == EWOULDBLOCK ) 385 return TR_NET_BLOCK; 386 387 return TR_NET_CLOSE; 395 388 } 396 389
Note: See TracChangeset
for help on using the changeset viewer.