Changeset 7747
- Timestamp:
- Jan 19, 2009, 1:55:41 PM (13 years ago)
- Location:
- trunk/libtransmission
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/peer-io.c
r7730 r7747 191 191 assert( tr_isPeerIo( io ) ); 192 192 193 io->hasFinishedConnecting = TRUE; 194 193 195 curlen = EVBUFFER_LENGTH( io->inbuf ); 194 196 howmuch = curlen >= max ? 0 : max - curlen; … … 271 273 assert( tr_isPeerIo( io ) ); 272 274 275 io->hasFinishedConnecting = TRUE; 276 273 277 dbgmsg( io, "libevent says this peer is ready to write" ); 274 278 … … 353 357 io->socket = socket; 354 358 io->isIncoming = isIncoming != 0; 359 io->hasFinishedConnecting = FALSE; 355 360 io->timeCreated = time( NULL ); 356 361 io->inbuf = evbuffer_new( ); … … 822 827 assert( tr_isDirection( dir ) ); 823 828 824 if( dir == TR_DOWN ) 825 bytesUsed = tr_peerIoTryRead( io, limit ); 826 else 827 bytesUsed = tr_peerIoTryWrite( io, limit ); 829 if( io->hasFinishedConnecting ) 830 { 831 if( dir == TR_DOWN ) 832 bytesUsed = tr_peerIoTryRead( io, limit ); 833 else 834 bytesUsed = tr_peerIoTryWrite( io, limit ); 835 } 828 836 829 837 dbgmsg( io, "flushing peer-io, direction %d, limit %zu, bytesUsed %zd", (int)dir, limit, bytesUsed ); -
trunk/libtransmission/peer-io.h
r7730 r7747 65 65 tr_bool fastExtensionSupported; 66 66 67 /* we create the socket in a nonblocking way, so this flag is initially 68 * false and then set to true when libevent says that the socket is ready 69 * for reading or writing */ 70 tr_bool hasFinishedConnecting; 71 67 72 int magicNumber; 68 73
Note: See TracChangeset
for help on using the changeset viewer.