tr_benc * tmp;
const char * str;
const uint8_t * raw;
+ tr_bool gotPeers = FALSE;
success = TRUE;
{
/* "compact" extension */
const int allAreSeeds = incomplete == 0;
- peerCount = publishNewPeersCompact( tier, allAreSeeds, raw, rawlen );
+ peerCount += publishNewPeersCompact( tier, allAreSeeds, raw, rawlen );
+ gotPeers = TRUE;
}
else if( tr_bencDictFindList( &benc, "peers", &tmp ) )
{
const tr_bool allAreSeeds = incomplete == 0;
size_t byteCount = 0;
uint8_t * array = parseOldPeers( tmp, &byteCount );
- peerCount = publishNewPeers( tier, allAreSeeds, array, byteCount );
+ peerCount += publishNewPeers( tier, allAreSeeds, array, byteCount );
+ gotPeers = TRUE;
tr_free( array );
}
/* "compact" extension */
const tr_bool allAreSeeds = incomplete == 0;
peerCount += publishNewPeersCompact6( tier, allAreSeeds, raw, rawlen );
+ gotPeers = TRUE;
}
if( tier->lastAnnounceStr[0] == '\0' )
tr_strlcpy( tier->lastAnnounceStr, _( "Success" ),
sizeof( tier->lastAnnounceStr ) );
- tier->lastAnnouncePeerCount = peerCount;
+ if( gotPeers )
+ tier->lastAnnouncePeerCount = peerCount;
}
if( bencLoaded )