From c35d4696ee5f93e8e885becb988a6766bf2eef2c Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 11 Feb 2010 00:43:47 +0000 Subject: [PATCH] (trunk libT) re-add the supportcrypto, requirecrypto announce arguments that were removed during announce testing in r10090 --- libtransmission/announcer.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libtransmission/announcer.c b/libtransmission/announcer.c index 8ece4a910..db7b3eb2b 100644 --- a/libtransmission/announcer.c +++ b/libtransmission/announcer.c @@ -658,6 +658,8 @@ createAnnounceURL( const tr_announcer * announcer, const char * str; const unsigned char * ipv6; + evbuffer_expand( buf, 2048 ); + evbuffer_add_printf( buf, "%s" "%c" "info_hash=%s" @@ -668,7 +670,8 @@ createAnnounceURL( const tr_announcer * announcer, "&left=%" PRIu64 "&numwant=%d" "&key=%s" - "&compact=1", + "&compact=1" + "&supportcrypto=1", ann, strchr( ann, '?' ) ? '&' : '?', torrent->info.hashEscaped, @@ -680,6 +683,9 @@ createAnnounceURL( const tr_announcer * announcer, numwant, tracker->key_param ); + if( announcer->session->encryptionMode == TR_ENCRYPTION_REQUIRED ) + evbuffer_add_printf( buf, "&requirecrypto=1" ); + if( tier->byteCounts[TR_ANN_CORRUPT] ) evbuffer_add_printf( buf, "&corrupt=%" PRIu64, tier->byteCounts[TR_ANN_CORRUPT] );