Changeset 6910
- Timestamp:
- Oct 15, 2008, 5:53:42 PM (13 years ago)
- Location:
- trunk/libtransmission
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/tracker.c
r6907 r6910 346 346 void * torrent_hash ) 347 347 { 348 int retry; 349 int success = FALSE; 348 int retry; 349 int success = FALSE; 350 int scrapeFields = 0; 350 351 tr_tracker * t; 351 352 … … 401 402 402 403 if( ( tr_bencDictFindInt( &benc, "complete", &i ) ) ) 404 { 405 ++scrapeFields; 403 406 t->seederCount = i; 407 } 404 408 405 409 if( ( tr_bencDictFindInt( &benc, "incomplete", &i ) ) ) 410 { 411 ++scrapeFields; 406 412 t->leecherCount = incomplete = i; 413 } 407 414 408 415 if( ( tr_bencDictFindInt( &benc, "downloaded", &i ) ) ) 416 { 417 ++scrapeFields; 409 418 t->timesDownloaded = i; 419 } 410 420 411 421 if( ( tmp = tr_bencDictFind( &benc, "peers" ) ) ) … … 447 457 dbgmsg( t->name, "request succeeded. reannouncing in %d seconds", 448 458 interval ); 449 if( t->scrapeAt <= now ) 459 460 /* if the announce response was a superset of the scrape response, 461 treat this as both a successful announce AND scrape. */ 462 if( scrapeFields >= 3 ) { 463 t->lastScrapeResponse = responseCode; 464 t->lastScrapeTime = now; 450 465 t->scrapeAt = now + t->scrapeIntervalSec + t->randOffset; 466 } 467 468 /* most trackers don't provide all the scrape responses, but do 469 provide most of them, so don't scrape too soon anyway */ 470 if( ( scrapeFields == 2 ) && ( t->scrapeAt <= ( now + 120 ) ) ) { 471 t->scrapeAt = now + t->scrapeIntervalSec + t->randOffset; 472 } 473 451 474 t->reannounceAt = now + interval; 452 475 t->manualAnnounceAllowedAt = now + t->announceMinIntervalSec; -
trunk/libtransmission/web.c
r6909 r6910 231 231 232 232 do { 233 dbgmsg( stderr,"event_cb calling socket_action fd %d, mask %d", fd, mask );233 dbgmsg( "event_cb calling socket_action fd %d, mask %d", fd, mask ); 234 234 rc = curl_multi_socket_action( g->multi, fd, mask, &g->still_running ); 235 235 } while( rc == CURLM_CALL_MULTI_PERFORM );
Note: See TracChangeset
for help on using the changeset viewer.