Changeset 6322
- Timestamp:
- Jul 11, 2008, 11:51:15 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gtk/details.c
r6283 r6322 1239 1239 1240 1240 static void 1241 refresh_countdown_lb( GtkWidget * l, time_t t,1241 refresh_countdown_lb( GtkWidget * w, time_t t, 1242 1242 const char * countdown_done ) 1243 1243 { 1244 1244 const time_t now = time( NULL ); 1245 1246 if( !t || ( t < now ) ) 1247 gtk_label_set_text( GTK_LABEL( l ), countdown_done ); 1245 GtkLabel * l = GTK_LABEL( w ); 1246 1247 if( t == 1 ) 1248 gtk_label_set_text( l, _( "In progress" ) ); 1249 else if( t < now ) 1250 gtk_label_set_text( l, countdown_done ); 1248 1251 else { 1249 1252 char buf[1024]; 1250 1253 const int seconds = t - now; 1251 1254 tr_strltime( buf, seconds, sizeof( buf ) ); 1252 gtk_label_set_text( GTK_LABEL( l ), buf );1255 gtk_label_set_text( l, buf ); 1253 1256 } 1254 1257 } -
trunk/libtransmission/tracker.c
r6282 r6322 724 724 { 725 725 t->lastScrapeTime = now; 726 t->scrapeAt = 0;726 t->scrapeAt = 1; 727 727 } 728 728 else 729 729 { 730 730 t->lastAnnounceTime = now; 731 t->reannounceAt = 0; 731 t->reannounceAt = 1; 732 t->manualAnnounceAllowedAt = 1; 732 733 t->scrapeAt = req->reqtype == TR_REQ_STOPPED 733 734 ? now + t->scrapeIntervalSec + t->randOffset … … 783 784 tr_tracker * t = tor->tracker; 784 785 785 if( t->scrapeAt && trackerSupportsScrape( t, tor ) && ( now >= t->scrapeAt ) ) { 786 t->scrapeAt = 0; 786 if( ( t->scrapeAt > 1 ) && 787 ( t->scrapeAt <= now ) && 788 ( trackerSupportsScrape( t, tor ) ) ) 789 { 790 t->scrapeAt = 1; 787 791 enqueueScrape( session, t ); 788 792 } 789 793 790 if( t->reannounceAt && t->isRunning && ( now >= t->reannounceAt ) ) { 791 t->reannounceAt = 0; 794 if( ( t->reannounceAt > 1 ) && 795 ( t->reannounceAt <= now ) && 796 ( t->isRunning ) ) 797 { 798 t->reannounceAt = 1; 799 t->manualAnnounceAllowedAt = 1; 792 800 enqueueRequest( session, t, TR_REQ_REANNOUNCE ); 793 801 } -
trunk/libtransmission/transmission.h
r6299 r6322 1302 1302 time_t lastScrapeTime; 1303 1303 1304 /** Time when the next scrape request will be sent. 1305 This value is always a valid time. */ 1304 /** Time when the next scrape request will be sent, 1305 or 0 if an error has occured that stops scraping, 1306 or 1 if a scrape is currently in progress s.t. 1307 we haven't set a timer for the next one yet. */ 1306 1308 time_t nextScrapeTime; 1307 1309 … … 1311 1313 1312 1314 /** Time when the next reannounce request will be sent, 1313 or zero if the torrent is stopped. */ 1315 or 0 if the torrent is stopped, 1316 or 1 if an announce is currently in progress s.t. 1317 we haven't set a timer for the next one yet */ 1314 1318 time_t nextAnnounceTime; 1315 1319 1316 1320 /** If the torrent is running, this is the time at which 1317 1321 the client can manually ask the torrent's tracker 1318 for more peers. otherwise, the value is zero. */ 1322 for more peers, 1323 or 0 if the torrent is stopped or doesn't allow manual, 1324 or 1 if an announce is currently in progress s.t. 1325 we haven't set a timer for the next one yet */ 1319 1326 time_t manualAnnounceTime; 1320 1327
Note: See TracChangeset
for help on using the changeset viewer.