1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-26 01:27:28 +00:00

possibly fix r3457 crash reported by chrissturm

This commit is contained in:
Charles Kerr 2007-10-18 19:33:29 +00:00
parent 212470560e
commit 78b5c81253

View file

@ -806,8 +806,8 @@ onTrackerResponse( struct evhttp_request * req, void * torrent_hash )
if( 200<=responseCode && responseCode<=299 ) if( 200<=responseCode && responseCode<=299 )
{ {
dbgmsg( t, "request succeeded. reannouncing in %d seconds", t->announceIntervalSec ); dbgmsg( t, "request succeeded. reannouncing in %d seconds",
t->announceIntervalSec );
t->manualAnnounceAllowedAt = time(NULL) t->manualAnnounceAllowedAt = time(NULL)
+ t->announceMinIntervalSec; + t->announceMinIntervalSec;
t->reannounceTimer = tr_timerNew( t->handle, t->reannounceTimer = tr_timerNew( t->handle,
@ -829,6 +829,7 @@ onTrackerResponse( struct evhttp_request * req, void * torrent_hash )
/* The request could not be understood by the server due to /* The request could not be understood by the server due to
* malformed syntax. The client SHOULD NOT repeat the * malformed syntax. The client SHOULD NOT repeat the
* request without modifications. */ * request without modifications. */
if( req && req->response_code_line )
publishErrorMessage( t, req->response_code_line ); publishErrorMessage( t, req->response_code_line );
t->manualAnnounceAllowedAt = ~(time_t)0; t->manualAnnounceAllowedAt = ~(time_t)0;
t->reannounceTimer = NULL; t->reannounceTimer = NULL;
@ -841,6 +842,7 @@ onTrackerResponse( struct evhttp_request * req, void * torrent_hash )
* cases in which the server is aware that it has erred or is * cases in which the server is aware that it has erred or is
* incapable of performing the request. So we pause a bit and * incapable of performing the request. So we pause a bit and
* try again. */ * try again. */
if( req && req->response_code_line )
publishWarning( t, req->response_code_line ); publishWarning( t, req->response_code_line );
t->manualAnnounceAllowedAt = ~(time_t)0; t->manualAnnounceAllowedAt = ~(time_t)0;
t->reannounceTimer = tr_timerNew( t->handle, onRetry, t, 15 * 1000 ); t->reannounceTimer = tr_timerNew( t->handle, onRetry, t, 15 * 1000 );
@ -850,6 +852,7 @@ onTrackerResponse( struct evhttp_request * req, void * torrent_hash )
dbgmsg( t, "unhandled condition... retrying in 120 seconds." ); dbgmsg( t, "unhandled condition... retrying in 120 seconds." );
/* WTF did we get?? */ /* WTF did we get?? */
if( req && req->response_code_line )
publishErrorMessage( t, req->response_code_line ); publishErrorMessage( t, req->response_code_line );
t->manualAnnounceAllowedAt = ~(time_t)0; t->manualAnnounceAllowedAt = ~(time_t)0;
t->reannounceTimer = tr_timerNew( t->handle, onRetry, t, 120 * 1000 ); t->reannounceTimer = tr_timerNew( t->handle, onRetry, t, 120 * 1000 );