Changeset 7769
- Timestamp:
- Jan 22, 2009, 4:20:30 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/peer-msgs.c
r7768 r7769 1173 1173 tr_peerIoReadUint8( msgs->peer->io, inbuf, &id ); 1174 1174 msgs->incoming.id = id; 1175 dbgmsg( msgs, "msgs->incoming.id is now %d; msgs->incoming.length is %zu", id, (size_t)msgs->incoming.length ); 1175 1176 1176 1177 if( id == BT_PIECE ) … … 1342 1343 --msglen; /* id length */ 1343 1344 1345 dbgmsg( msgs, "got BT id %d, len %d, buffer size is %zu", (int)id, (int)msglen, inlen ); 1346 1344 1347 if( inlen < msglen ) 1345 1348 return READ_LATER; 1346 1347 dbgmsg( msgs, "got BT id %d, len %d, buffer size is %zu", (int)id, (int)msglen, inlen );1348 1349 1349 1350 if( !messageLengthIsCorrect( msgs, id, msglen + 1 ) ) … … 1607 1608 const size_t inlen = EVBUFFER_LENGTH( in ); 1608 1609 1610 dbgmsg( msgs, "canRead: inlen is %zu, msgs->state is %d", inlen, msgs->state ); 1611 1609 1612 if( !inlen ) 1610 1613 { … … 1630 1633 assert( 0 ); 1631 1634 } 1635 1636 dbgmsg( msgs, "canRead: ret is %d", (int)ret ); 1632 1637 1633 1638 /* log the raw data that was read */ … … 1963 1968 int bencLen; 1964 1969 uint8_t * tmp, *walk; 1970 tr_peerIo * io = msgs->peer->io; 1965 1971 struct evbuffer * out = msgs->outMessages; 1966 1972 … … 2045 2051 /* write the pex message */ 2046 2052 benc = tr_bencSave( &val, &bencLen ); 2047 tr_peerIoWriteUint32( msgs->peer->io, out, 2 * sizeof( uint8_t ) + bencLen );2048 tr_peerIoWriteUint8 ( msgs->peer->io, out, BT_LTEP );2049 tr_peerIoWriteUint8 ( msgs->peer->io, out, msgs->ut_pex_id );2050 tr_peerIoWriteBytes ( msgs->peer->io, out, benc, bencLen );2053 tr_peerIoWriteUint32( io, out, 2 * sizeof( uint8_t ) + bencLen ); 2054 tr_peerIoWriteUint8 ( io, out, BT_LTEP ); 2055 tr_peerIoWriteUint8 ( io, out, msgs->ut_pex_id ); 2056 tr_peerIoWriteBytes ( io, out, benc, bencLen ); 2051 2057 pokeBatchPeriod( msgs, HIGH_PRIORITY_INTERVAL_SECS ); 2052 2058 dbgmsg( msgs, "sending a pex message; outMessage size is now %zu", EVBUFFER_LENGTH( out ) ); 2059 dbgOutMessageLen( msgs ); 2053 2060 2054 2061 tr_free( benc );
Note: See TracChangeset
for help on using the changeset viewer.