mirror of
https://github.com/transmission/transmission
synced 2024-12-29 19:16:23 +00:00
parent
efaa9d0ddc
commit
ac4fa04277
1 changed files with 10 additions and 2 deletions
|
@ -74,7 +74,6 @@ static char* announce_url_new(tr_session const* session, tr_announce_request con
|
|||
"&port=%d"
|
||||
"&uploaded=%" PRIu64
|
||||
"&downloaded=%" PRIu64
|
||||
"&left=%" PRIu64
|
||||
"&numwant=%d"
|
||||
"&key=%x"
|
||||
"&compact=1"
|
||||
|
@ -86,10 +85,19 @@ static char* announce_url_new(tr_session const* session, tr_announce_request con
|
|||
req->port,
|
||||
req->up,
|
||||
req->down,
|
||||
req->leftUntilComplete,
|
||||
req->numwant,
|
||||
req->key);
|
||||
|
||||
if (req->leftUntilComplete != ~(uint64_t)0)
|
||||
{
|
||||
evbuffer_add_printf(buf, "&left=%" PRIu64, req->leftUntilComplete);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Support trackers which don't react to huge numbers well (e.g. Amazon S3)
|
||||
evbuffer_add_printf(buf, "&left=-1");
|
||||
}
|
||||
|
||||
if (session->encryptionMode == TR_ENCRYPTION_REQUIRED)
|
||||
{
|
||||
evbuffer_add_printf(buf, "&requirecrypto=1");
|
||||
|
|
Loading…
Reference in a new issue