1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-23 00:04:06 +00:00

(trunk libT) more improvements to tr_announcerResetTorrent()

This commit is contained in:
Charles Kerr 2010-02-14 05:34:03 +00:00
parent 586602a13a
commit be80f3bbde

View file

@ -400,6 +400,7 @@ typedef struct
tr_bool isRunning; tr_bool isRunning;
tr_bool isAnnouncing; tr_bool isAnnouncing;
tr_bool isScraping; tr_bool isScraping;
tr_bool wasCopied;
char lastAnnounceStr[128]; char lastAnnounceStr[128];
char lastScrapeStr[128]; char lastScrapeStr[128];
@ -867,6 +868,7 @@ tr_announcerResetTorrent( tr_announcer * announcer, tr_torrent * tor )
tierCopyAttributes( t, o ); tierCopyAttributes( t, o );
t->currentTracker = item; t->currentTracker = item;
t->currentTrackerIndex = k; t->currentTrackerIndex = k;
t->wasCopied = TRUE;
trackerItemCopyAttributes( item, o->currentTracker ); trackerItemCopyAttributes( item, o->currentTracker );
dbgmsg( t, "attributes copied to tier %d, tracker %d" dbgmsg( t, "attributes copied to tier %d, tracker %d"
"from tier %d, tracker %d", "from tier %d, tracker %d",
@ -885,7 +887,7 @@ tr_announcerResetTorrent( tr_announcer * announcer, tr_torrent * tor )
tr_tier ** tiers = (tr_tier**) tr_ptrArrayPeek( &tor->tiers->tiers, &n ); tr_tier ** tiers = (tr_tier**) tr_ptrArrayPeek( &tor->tiers->tiers, &n );
for( i=0; i<n; ++i ) { for( i=0; i<n; ++i ) {
tr_tier * tier = tiers[i]; tr_tier * tier = tiers[i];
if( !tier->isRunning ) if( !tier->wasCopied )
tierAddAnnounce( tier, STARTED, now ); tierAddAnnounce( tier, STARTED, now );
} }
} }