From 9fe6f403eb4518f9e8bcd8c0cf62be7b29523e12 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Mon, 27 Oct 2008 18:09:15 +0000 Subject: [PATCH] janitorial. (1) re-enable `deflate' in transmission-remote iff libz is installed (2) change c++-style comments to c-style comments (3) add positional arguments to a couple of libT strings marked for translation --- daemon/remote.c | 2 +- libtransmission/JSON_parser.c | 2 +- libtransmission/tracker.c | 4 +++- libtransmission/webseed.c | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/daemon/remote.c b/daemon/remote.c index c9ef2e3a6..0df878a2d 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -1056,7 +1056,7 @@ processRequests( const char * host, curl = curl_easy_init( ); curl_easy_setopt( curl, CURLOPT_VERBOSE, debug ); #ifdef HAVE_LIBZ -// curl_easy_setopt( curl, CURLOPT_ENCODING, "deflate" ); + curl_easy_setopt( curl, CURLOPT_ENCODING, "deflate" ); #endif curl_easy_setopt( curl, CURLOPT_USERAGENT, MY_NAME "/" LONG_VERSION_STRING ); diff --git a/libtransmission/JSON_parser.c b/libtransmission/JSON_parser.c index f8797d520..6ed112be2 100644 --- a/libtransmission/JSON_parser.c +++ b/libtransmission/JSON_parser.c @@ -63,7 +63,7 @@ SOFTWARE. #include "ConvertUTF.h" #if _MSC_VER >= 1400 /* Visual Studio 2005 and up */ -# pragma warning(disable:4996) // unsecure sscanf +# pragma warning(disable:4996) /* unsecure sscanf */ #endif diff --git a/libtransmission/tracker.c b/libtransmission/tracker.c index 693bd6e55..ab75ca3a7 100644 --- a/libtransmission/tracker.c +++ b/libtransmission/tracker.c @@ -446,7 +446,9 @@ onTrackerResponse( tr_session * session, } else { - char * buf = tr_strdup_printf( _( "Tracker request failed. Got HTTP Status Code %ld (%s)" ), + /* %1$ld - http status code, such as 404 + * %2$s - human-readable explanation of the http status code */ + char * buf = tr_strdup_printf( _( "Tracker request failed. Got HTTP Status Code %1$ld (%2$s)" ), responseCode, tr_webGetResponseStr( responseCode ) ); publishWarning( t, buf ); diff --git a/libtransmission/webseed.c b/libtransmission/webseed.c index 50d365407..b0a89304d 100644 --- a/libtransmission/webseed.c +++ b/libtransmission/webseed.c @@ -262,9 +262,9 @@ requestNextChunk( tr_webseed * w ) thisPass = MIN( left, inf->files[fileIndex].length - fileOffset ); url = makeURL( w, &inf->files[fileIndex] ); -//fprintf( stderr, "url is [%s]\n", url ); +/*fprintf( stderr, "url is [%s]\n", url );*/ range = tr_strdup_printf( "%"PRIu64"-%"PRIu64, fileOffset, fileOffset + thisPass - 1 ); -//fprintf( stderr, "range is [%s] ... we want %lu total, we have %lu, so %lu are left, and we're asking for %lu this time\n", range, (unsigned long)w->byteCount, (unsigned long)have, (unsigned long)left, (unsigned long)thisPass ); +/*fprintf( stderr, "range is [%s] ... we want %lu total, we have %lu, so %lu are left, and we're asking for %lu this time\n", range, (unsigned long)w->byteCount, (unsigned long)have, (unsigned long)left, (unsigned long)thisPass );*/ tr_webRun( w->torrent->session, url, range, webResponseFunc, w ); tr_free( range ); tr_free( url ); -- 2.40.0