From acc8e6410230aa9363ac191e3b8ff8651b1e7e77 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Wed, 10 Feb 2010 04:35:59 +0000 Subject: [PATCH] (trunk) another test build that logs tracker announces to a file in /tmp, so you probably shouldn't use it unless I've asked you to. After hudson-t is done building a debug dmg of this, I'll commit r10155 to remove the logging code --- configure.ac | 4 ++-- libtransmission/web.c | 12 ++++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 871a22ded..607b6f581 100644 --- a/configure.ac +++ b/configure.ac @@ -3,8 +3,8 @@ dnl STATUS: "X" for prerelease beta builds, dnl "Z" for unsupported trunk builds, dnl "0" for stable, supported releases dnl these should be the only two lines you need to change -m4_define([user_agent_prefix],[1.83]) -m4_define([peer_id_prefix],[-TR1830-]) +m4_define([user_agent_prefix],[1.84y]) +m4_define([peer_id_prefix],[-TR184y-]) AC_INIT([transmission], [user_agent_prefix], diff --git a/libtransmission/web.c b/libtransmission/web.c index 7760fb076..fb30f4b0f 100644 --- a/libtransmission/web.c +++ b/libtransmission/web.c @@ -319,12 +319,18 @@ addTask( void * vtask ) } else { +static FILE * fp = NULL; CURL * e = curl_easy_init( ); struct tr_web * web = session->web; const int timeout = getTimeoutFromURL( task->url ); - const long verbose = getenv( "TR_CURL_VERBOSE" ) != NULL; + //const long verbose = getenv( "TR_CURL_VERBOSE" ) != NULL; const char * user_agent = TR_NAME "/" SHORT_VERSION_STRING; +if( fp == NULL ) { + fp = fopen( "/tmp/transmission-announce-log.txt", "a+" ); + fprintf( fp, "Starting new Transmission session...\n" ); +} + /* insert the resolved host into the URL s.t. curl's DNS won't block * even if -- like on most OSes -- it wasn't built with C-Ares :( * "http://www.craptrackular.org/announce?key=val&key2=..." becomes @@ -392,7 +398,9 @@ addTask( void * vtask ) curl_easy_setopt( e, CURLOPT_SSL_VERIFYPEER, 0L ); curl_easy_setopt( e, CURLOPT_URL, task->resolved_url ? task->resolved_url : task->url ); curl_easy_setopt( e, CURLOPT_USERAGENT, user_agent ); - curl_easy_setopt( e, CURLOPT_VERBOSE, verbose ); + //curl_easy_setopt( e, CURLOPT_VERBOSE, verbose ); +curl_easy_setopt( e, CURLOPT_VERBOSE, TRUE ); +curl_easy_setopt( e, CURLOPT_STDERR, fp ); if( web->haveAddr ) curl_easy_setopt( e, CURLOPT_INTERFACE, tr_ntop_non_ts( &web->addr ) ); if( task->range ) -- 2.40.0