Changeset 11448


Ignore:
Timestamp:
Dec 3, 2010, 9:53:37 PM (11 years ago)
Author:
charles
Message:

(trunk libT) possibly fix the "no announce scheduled" issue reported in the forums

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/announcer.c

    r11362 r11448  
    603603{
    604604    publishMessage( tier, NULL, TR_TRACKER_ERROR_CLEAR );
    605 }
    606 
    607 static void
    608 publishErrorMessageAndStop( tr_tier * tier, const char * msg )
    609 {
    610     tier->isRunning = FALSE;
    611 
    612     publishMessage( tier, msg, TR_TRACKER_ERROR );
    613605}
    614606
     
    14541446            tier->manualAnnounceAllowedAt = now + tier->announceMinIntervalSec;
    14551447        }
    1456         else if( ( responseCode == 404 ) || ( 500 <= responseCode && responseCode <= 599 ) )
     1448        else if( 400 <= responseCode && responseCode <= 599 )
    14571449        {
    14581450            /* 404: The requested resource could not be found but may be
     
    14641456             * So we pause a bit and try again. */
    14651457
     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             
    14661464            const int interval = getRetryInterval( tier->currentTracker->host );
    14671465            tier->manualAnnounceAllowedAt = ~(time_t)0;
    14681466            tierAddAnnounce( tier, announceEvent, now + interval );
    1469         }
    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;
    14791467        }
    14801468        else
Note: See TracChangeset for help on using the changeset viewer.