tr_benc top;
char filename[MAX_PATH_LENGTH];
+ if( !tor )
+ return;
+
tr_bencInitDict( &top, 14 );
tr_bencDictAddInt( &top, KEY_ACTIVITY_DATE,
tor->activityDate );
#include "completion.h"
#include "net.h"
#include "publish.h"
+#include "resume.h"
#include "torrent.h"
#include "tracker.h"
#include "trevent.h"
t->scrapeAt = now + t->scrapeIntervalSec + t->randOffset;
t->reannounceAt = now + interval;
t->manualAnnounceAllowedAt = now + t->announceMinIntervalSec;
+
+ /* #319: save the .resume file after an announce so that, in case
+ * of a crash, our stats still match up with the tracker's stats */
+ tr_torrentSaveResume( tr_torrentFindFromHash( t->session, t->hash ) );
}
else if( 300<=responseCode && responseCode<=399 )
{