Changeset 3991


Ignore:
Timestamp:
Nov 26, 2007, 9:26:01 PM (14 years ago)
Author:
charles
Message:

possible fix for Zeph's "too many open files" bug report.

Location:
trunk/libtransmission
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/tracker.c

    r3937 r3991  
    247247}
    248248
    249 static void scrapeNow( tr_tracker * );
     249static int onScrapeNow( void * vt );
    250250
    251251tr_tracker *
     
    302302    assert( iwalk - t->tierFronts == sum );
    303303
    304     scrapeNow( t );
     304    /* scrape sometime in the next two minutes.
     305       scrapes are staggered out like this to prevent
     306       hundreds of scrapes from going out at the same time */
     307    t->scrapeTimer = tr_timerNew( t->handle,
     308                                  onScrapeNow, t,
     309                                  tr_rand(120)*1000 );
     310
    305311    return t;
    306312}
     
    488494***/
    489495
    490 static int
    491 onScrapeNow( void * vt );
    492 
    493496static void
    494497onScrapeResponse( struct evhttp_request * req, void * vhash )
     
    598601    t->scrapeTimer = NULL;
    599602    return FALSE;
    600 }
    601 
    602 static void
    603 scrapeNow( tr_tracker * t )
    604 {
    605     onScrapeNow( t );
    606603}
    607604
  • trunk/libtransmission/utils.h

    r3900 r3991  
    4141char* tr_getLogTimeStr( char * buf, int buflen );
    4242
    43 int  tr_rand ( int );
     43int tr_rand ( int );
    4444
    4545int tr_mkdirp( const char * path, int permissions );
Note: See TracChangeset for help on using the changeset viewer.