Save resume information when a torrent finishes downloading.

This commit is contained in:
Josh Elsasser 2006-02-08 17:48:18 +00:00
parent 65316f1b72
commit a72881fdda
3 changed files with 7 additions and 0 deletions

View File

@ -183,6 +183,11 @@ void tr_ioClose( tr_io_t * io )
free( io );
}
void tr_ioSaveResume( tr_io_t * io )
{
fastResumeSave( io );
}
/***********************************************************************
* createFiles
***********************************************************************

View File

@ -29,5 +29,6 @@ tr_io_t * tr_ioInit ( tr_torrent_t * );
int tr_ioRead ( tr_io_t *, int, int, int, uint8_t * );
int tr_ioWrite ( tr_io_t *, int, int, int, uint8_t * );
void tr_ioClose ( tr_io_t * );
void tr_ioSaveResume ( tr_io_t * );
#endif

View File

@ -561,6 +561,7 @@ static void downloadLoop( void * _tor )
tor->status = TR_STATUS_SEED;
tor->finished = 1;
tr_trackerCompleted( tor->tracker );
tr_ioSaveResume( tor->io );
}
/* Receive/send messages */