#593: 1.01 crash

This commit is contained in:
Charles Kerr 2008-01-13 15:52:56 +00:00
parent 24b6549a76
commit e7163a5433
1 changed files with 2 additions and 7 deletions

View File

@ -1854,15 +1854,10 @@ tr_peerMsgsNew( struct tr_torrent * torrent,
m->incoming.block = evbuffer_new( );
m->outBlock = evbuffer_new( );
m->peerAllowedPieces = NULL;
m->clientAllowedPieces = NULL;
m->clientSuggestedPieces = NULL;
m->clientAllowedPieces = tr_bitfieldNew( m->torrent->info.pieceCount );
m->clientSuggestedPieces = tr_bitfieldNew( m->torrent->info.pieceCount );
*setme = tr_publisherSubscribe( m->publisher, func, userData );
if ( tr_peerIoSupportsFEXT( m->io ) ) {
m->clientAllowedPieces = tr_bitfieldNew( m->torrent->info.pieceCount );
m->clientSuggestedPieces = tr_bitfieldNew( m->torrent->info.pieceCount );
}
tr_peerIoSetTimeoutSecs( m->io, 150 ); /* timeout after N seconds of inactivity */
tr_peerIoSetIOFuncs( m->io, canRead, didWrite, gotError, m );
ratePulse( m );