(trunk libT) during the extended handshake, don't send the "m" dict if it doesn't have any entries.

This commit is contained in:
Jordan Lee 2011-07-25 20:46:56 +00:00
parent 17d1210b95
commit fe42e456b4
1 changed files with 2 additions and 0 deletions

View File

@ -327,6 +327,8 @@ tr_torrentGetNextMetadataRequest( tr_torrent * tor, time_t now, int * setme_piec
m = tor->incompleteMetadata;
fprintf( stderr, "%s:%d m %p a %d b %d\n", __FILE__, __LINE__, m, (m?( m->piecesNeededCount > 0 ):-1), (m?( m->piecesNeeded[0].requestedAt + MIN_REPEAT_INTERVAL_SECS < now ):-1) );
if( ( m != NULL )
&& ( m->piecesNeededCount > 0 )
&& ( m->piecesNeeded[0].requestedAt + MIN_REPEAT_INTERVAL_SECS < now ) )