Changeset 11450


Ignore:
Timestamp:
Dec 3, 2010, 11:10:24 PM (11 years ago)
Author:
charles
Message:

(trunk libT) r11448 seems to have been a red herring, so undo that commit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/announcer.c

    r11448 r11450  
    604604    publishMessage( tier, NULL, TR_TRACKER_ERROR_CLEAR );
    605605}
     606
     607static void
     608publishErrorMessageAndStop( tr_tier * tier, const char * msg )
     609{
     610    tier->isRunning = FALSE;
     611
     612    publishMessage( tier, msg, TR_TRACKER_ERROR );
     613}
    606614
    607615static void
     
    14461454            tier->manualAnnounceAllowedAt = now + tier->announceMinIntervalSec;
    14471455        }
    1448         else if( 400 <= responseCode && responseCode <= 599 )
     1456        else if( ( responseCode == 404 ) || ( 500 <= responseCode && responseCode <= 599 ) )
    14491457        {
    14501458            /* 404: The requested resource could not be found but may be
     
    14561464             * So we pause a bit and try again. */
    14571465
    1458             /* 4xx: The request could not be understood by the server due to
    1459              * malformed syntax. The client SHOULD NOT repeat the
    1460              * request without modifications... however, some trackers spit
    1461              * out 4xx messages too freely, so we can't disable reannounces
    1462              * altogether.  Use the same sliding scale that 404 and 5xx use. */
    1463              
    14641466            const int interval = getRetryInterval( tier->currentTracker->host );
    14651467            tier->manualAnnounceAllowedAt = ~(time_t)0;
    14661468            tierAddAnnounce( tier, announceEvent, now + interval );
    14671469        }
     1470        else if( 400 <= responseCode && responseCode <= 499 )
     1471        {
     1472            /* The request could not be understood by the server due to
     1473             * malformed syntax. The client SHOULD NOT repeat the
     1474             * request without modifications. */
     1475            if( tr_torrentIsPrivate( tier->tor ) || ( tier->tor->info.trackerCount < 2 ) )
     1476                publishErrorMessageAndStop( tier, _( "Tracker returned a 4xx message" ) );
     1477            tier->announceAt = 0;
     1478            tier->manualAnnounceAllowedAt = ~(time_t)0;
     1479        }
    14681480        else
    14691481        {
Note: See TracChangeset for help on using the changeset viewer.