mirror of
https://github.com/transmission/transmission
synced 2024-12-25 01:03:01 +00:00
(trunk, libT) #4089: 'magnet download not verified for existing data' -- patch by cfpp2p
This commit is contained in:
parent
2ec84b2e32
commit
b342c2c180
3 changed files with 14 additions and 0 deletions
|
@ -299,6 +299,9 @@ tr_torrentSetMetadataPiece (tr_torrent * tor, int piece, const void * data, in
|
|||
{
|
||||
incompleteMetadataFree (tor->incompleteMetadata);
|
||||
tor->incompleteMetadata = NULL;
|
||||
tor->isStopping = true;
|
||||
tor->magnetVerify = true;
|
||||
tor->startAfterVerify = true;
|
||||
}
|
||||
else /* drat. */
|
||||
{
|
||||
|
|
|
@ -1873,6 +1873,14 @@ stopTorrent (void * vtor)
|
|||
torrentSetQueued (tor, false);
|
||||
|
||||
tr_torrentUnlock (tor);
|
||||
|
||||
if (tor->magnetVerify)
|
||||
{
|
||||
tor->magnetVerify = false;
|
||||
tr_logAddTorInfo (tor, "%s", "Magnet Verify");
|
||||
refreshCurrentDir (tor);
|
||||
tr_torrentVerify (tor, NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1907,6 +1915,7 @@ closeTorrent (void * vtor)
|
|||
|
||||
tr_logAddTorInfo (tor, "%s", _("Removing torrent"));
|
||||
|
||||
tor->magnetVerify = false;
|
||||
stopTorrent (tor);
|
||||
|
||||
if (tor->isDeleting)
|
||||
|
|
|
@ -247,6 +247,8 @@ struct tr_torrent
|
|||
bool isDirty;
|
||||
bool isQueued;
|
||||
|
||||
bool magnetVerify;
|
||||
|
||||
bool infoDictOffsetIsCached;
|
||||
|
||||
uint16_t maxConnectedPeers;
|
||||
|
|
Loading…
Reference in a new issue