static void onReqDone( tr_session * session );
static void
-updateAddresses( tr_tracker * t, long response_code, int * tryAgain )
+updateAddresses( tr_tracker * t,
+ long response_code,
+ int moveToNextAddress,
+ int * tryAgain )
{
- int moveToNextAddress = FALSE;
tr_torrent * torrent = tr_torrentFindFromHash( t->session, t->hash );
+
if( !response_code ) /* tracker didn't respond */
{
tr_ninf( t->name, _( "Tracker hasn't responded yet. Retrying..." ) );
}
*tryAgain = moveToNextAddress;
-
if( moveToNextAddress )
{
if ( ++t->trackerIndex >= torrent->info.trackerCount ) /* we've tried them all */
size_t responseLen,
void * torrent_hash )
{
+ int moveToNextAddress = FALSE;
int tryAgain;
tr_tracker * t;
int incomplete = -1;
const char * str;
- if(( tr_bencDictFindStr( &benc, "failure reason", &str )))
- publishErrorMessageAndStop( t, str );
+ if(( tr_bencDictFindStr( &benc, "failure reason", &str ))) {
+ // publishErrorMessageAndStop( t, str );
+ moveToNextAddress = TRUE;
+ publishMessage( t, str, TR_TRACKER_ERROR );
+ }
if(( tr_bencDictFindStr( &benc, "warning message", &str )))
publishWarning( t, str );
tr_bencFree( &benc );
}
- updateAddresses( t, responseCode, &tryAgain );
+ updateAddresses( t, responseCode, moveToNextAddress, &tryAgain );
/**
***
size_t responseLen,
void * torrent_hash )
{
+ int moveToNextAddress = FALSE;
int tryAgain;
tr_tracker * t;
t->retryScrapeIntervalSec = 30;
}
}
+ else
+ moveToNextAddress = TRUE;
if( bencLoaded )
tr_bencFree( &benc );
}
- updateAddresses( t, responseCode, &tryAgain );
+ updateAddresses( t, responseCode, moveToNextAddress, &tryAgain );
/**
***