Changeset 6282


Ignore:
Timestamp:
Jul 2, 2008, 1:46:10 AM (13 years ago)
Author:
charles
Message:

(libT) #319: periodically save the .resume file in case of crash

Location:
trunk/libtransmission
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/resume.c

    r6072 r6282  
    350350    tr_benc top;
    351351    char filename[MAX_PATH_LENGTH];
     352
     353    if( !tor )
     354        return;
    352355
    353356    tr_bencInitDict( &top, 14 );
  • trunk/libtransmission/tracker.c

    r6281 r6282  
    2323#include "net.h"
    2424#include "publish.h"
     25#include "resume.h"
    2526#include "torrent.h"
    2627#include "tracker.h"
     
    401402        t->reannounceAt = now + interval;
    402403        t->manualAnnounceAllowedAt = now + t->announceMinIntervalSec;
     404
     405        /* #319: save the .resume file after an announce so that, in case
     406         * of a crash, our stats still match up with the tracker's stats */
     407        tr_torrentSaveResume( tr_torrentFindFromHash( t->session, t->hash ) );
    403408    }
    404409    else if( 300<=responseCode && responseCode<=399 )
Note: See TracChangeset for help on using the changeset viewer.