mirror of
https://github.com/transmission/transmission
synced 2024-12-25 09:13:06 +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);
|
incompleteMetadataFree (tor->incompleteMetadata);
|
||||||
tor->incompleteMetadata = NULL;
|
tor->incompleteMetadata = NULL;
|
||||||
|
tor->isStopping = true;
|
||||||
|
tor->magnetVerify = true;
|
||||||
|
tor->startAfterVerify = true;
|
||||||
}
|
}
|
||||||
else /* drat. */
|
else /* drat. */
|
||||||
{
|
{
|
||||||
|
|
|
@ -1873,6 +1873,14 @@ stopTorrent (void * vtor)
|
||||||
torrentSetQueued (tor, false);
|
torrentSetQueued (tor, false);
|
||||||
|
|
||||||
tr_torrentUnlock (tor);
|
tr_torrentUnlock (tor);
|
||||||
|
|
||||||
|
if (tor->magnetVerify)
|
||||||
|
{
|
||||||
|
tor->magnetVerify = false;
|
||||||
|
tr_logAddTorInfo (tor, "%s", "Magnet Verify");
|
||||||
|
refreshCurrentDir (tor);
|
||||||
|
tr_torrentVerify (tor, NULL, NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -1907,6 +1915,7 @@ closeTorrent (void * vtor)
|
||||||
|
|
||||||
tr_logAddTorInfo (tor, "%s", _("Removing torrent"));
|
tr_logAddTorInfo (tor, "%s", _("Removing torrent"));
|
||||||
|
|
||||||
|
tor->magnetVerify = false;
|
||||||
stopTorrent (tor);
|
stopTorrent (tor);
|
||||||
|
|
||||||
if (tor->isDeleting)
|
if (tor->isDeleting)
|
||||||
|
|
|
@ -247,6 +247,8 @@ struct tr_torrent
|
||||||
bool isDirty;
|
bool isDirty;
|
||||||
bool isQueued;
|
bool isQueued;
|
||||||
|
|
||||||
|
bool magnetVerify;
|
||||||
|
|
||||||
bool infoDictOffsetIsCached;
|
bool infoDictOffsetIsCached;
|
||||||
|
|
||||||
uint16_t maxConnectedPeers;
|
uint16_t maxConnectedPeers;
|
||||||
|
|
Loading…
Reference in a new issue