From: Jordan Lee Date: Wed, 30 Jan 2013 19:59:55 +0000 (+0000) Subject: (libT) when announcing a magnet link for the first time, send 'left=0' X-Git-Tag: 2.80~169 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1b5cc093e6e68b38b3d95505ab54e26930923a1c;p=transmission (libT) when announcing a magnet link for the first time, send 'left=0' --- diff --git a/libtransmission/announcer.c b/libtransmission/announcer.c index 09ac72764..9d27e7d02 100644 --- a/libtransmission/announcer.c +++ b/libtransmission/announcer.c @@ -920,7 +920,7 @@ announce_request_new (const tr_announcer * announcer, req->corrupt = tier->byteCounts[TR_ANN_CORRUPT]; req->leftUntilComplete = tr_torrentHasMetadata (tor) ? tor->info.totalSize - tr_cpHaveTotal (&tor->completion) - : ~ (uint64_t)0; + : 0; req->event = event; req->numwant = event == TR_ANNOUNCE_EVENT_STOPPED ? 0 : NUMWANT; req->key = announcer->key; @@ -1206,6 +1206,24 @@ announce_request_delegate (tr_announcer * announcer, { tr_session * session = announcer->session; +#if 0 + fprintf (stderr, "ANNOUNCE: event %s isPartialSeed %d port %d key %d numwant %d" + " up %"PRIu64" down %"PRIu64" corrupt %"PRIu64" left %"PRIu64 + " url [%s] tracker_id_str [%s] peer_id [%8.8s]\n", + tr_announce_event_get_string (request->event), + (int)request->partial_seed, + (int)request->port, + request->key, + request->numwant, + request->up, + request->down, + request->corrupt, + request->leftUntilComplete, + request->url, + request->tracker_id_str, + request->peer_id); +#endif + if (!memcmp (request->url, "http", 4)) tr_tracker_http_announce (session, request, callback, callback_data); else if (!memcmp (request->url, "udp://", 6))