]> granicus.if.org Git - transmission/commitdiff
(trunk libT) more improvements to tr_announcerResetTorrent()
authorCharles Kerr <charles@transmissionbt.com>
Sun, 14 Feb 2010 05:34:03 +0000 (05:34 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Sun, 14 Feb 2010 05:34:03 +0000 (05:34 +0000)
libtransmission/announcer.c

index 4f1932532877b445a99a3b7cbb214b6bd291eeda..08c281b7f36dd808c864725668c6a9df51bd201e 100644 (file)
@@ -400,6 +400,7 @@ typedef struct
     tr_bool isRunning;
     tr_bool isAnnouncing;
     tr_bool isScraping;
+    tr_bool wasCopied;
 
     char lastAnnounceStr[128];
     char lastScrapeStr[128];
@@ -867,6 +868,7 @@ tr_announcerResetTorrent( tr_announcer * announcer, tr_torrent * tor )
                     tierCopyAttributes( t, o );
                     t->currentTracker = item;
                     t->currentTrackerIndex = k;
+                    t->wasCopied = TRUE;
                     trackerItemCopyAttributes( item, o->currentTracker );
                     dbgmsg( t, "attributes copied to 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 );
         for( i=0; i<n; ++i ) {
             tr_tier * tier = tiers[i];
-            if( !tier->isRunning )    
+            if( !tier->wasCopied )    
                 tierAddAnnounce( tier, STARTED, now );
         }
     }