(libT) #1359: Transmission shows no tracker error when unable to contact the tracker

This commit is contained in:
Charles Kerr 2008-10-27 18:00:03 +00:00
parent 11f240365e
commit 98168cb605
2 changed files with 17 additions and 2 deletions

View File

@ -444,6 +444,14 @@ onTrackerResponse( tr_session * session,
if( bencLoaded )
tr_bencFree( &benc );
}
else
{
char * buf = tr_strdup_printf( _( "Tracker request failed. Got HTTP Status Code %ld (%s)" ),
responseCode,
tr_webGetResponseStr( responseCode ) );
publishWarning( t, buf );
tr_free( buf );
}
retry = updateAddresses( t, success );

View File

@ -29,13 +29,19 @@
/* arbitrary number */
#define DEFAULT_TIMER_MSEC 2000
#if 0
#define dbgmsg(...) \
do { \
fprintf( stderr, __VA_ARGS__ ); \
fprintf( stderr, "\n" ); \
} while( 0 )
#else
#define dbgmsg( ... ) \
do { \
if( tr_deepLoggingIsActive( ) ) \
tr_deepLog( __FILE__, __LINE__, "web", __VA_ARGS__ ); \
} while( 0 )
/* #define dbgmsg(...) \
do { fprintf( stderr, __VA_ARGS__ ); fprintf( stderr, "\n" ); } while( 0 ) */
#endif
struct tr_web
{
@ -113,6 +119,7 @@ addTask( void * vtask )
tr_free( str );
}
curl_easy_setopt( easy, CURLOPT_CONNECTTIMEOUT, 60 );
curl_easy_setopt( easy, CURLOPT_FOLLOWLOCATION, 1 );
curl_easy_setopt( easy, CURLOPT_MAXREDIRS, 16 );
curl_easy_setopt( easy, CURLOPT_NOSIGNAL, 1 );