From be80f3bbdea0ff85866e0f4b19cc3905909914a3 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sun, 14 Feb 2010 05:34:03 +0000 Subject: [PATCH] (trunk libT) more improvements to tr_announcerResetTorrent() --- libtransmission/announcer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libtransmission/announcer.c b/libtransmission/announcer.c index 4f1932532..08c281b7f 100644 --- a/libtransmission/announcer.c +++ b/libtransmission/announcer.c @@ -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; iisRunning ) + if( !tier->wasCopied ) tierAddAnnounce( tier, STARTED, now ); } }