mirror of
https://github.com/transmission/transmission
synced 2024-12-27 01:57:52 +00:00
(trunk libT) #2429: add some more assertions to help smoke out this bug
This commit is contained in:
parent
a88683d650
commit
d08ab9e510
1 changed files with 4 additions and 0 deletions
|
@ -549,6 +549,8 @@ loadFromFile( tr_torrent * tor,
|
||||||
tr_bool boolVal;
|
tr_bool boolVal;
|
||||||
const tr_bool wasDirty = tor->isDirty;
|
const tr_bool wasDirty = tor->isDirty;
|
||||||
|
|
||||||
|
assert( tr_isTorrent( tor ) );
|
||||||
|
|
||||||
filename = getResumeFilename( tor );
|
filename = getResumeFilename( tor );
|
||||||
|
|
||||||
if( tr_bencLoadFile( &top, TR_FMT_BENC, filename ) )
|
if( tr_bencLoadFile( &top, TR_FMT_BENC, filename ) )
|
||||||
|
@ -730,6 +732,8 @@ tr_torrentLoadResume( tr_torrent * tor,
|
||||||
{
|
{
|
||||||
uint64_t ret = 0;
|
uint64_t ret = 0;
|
||||||
|
|
||||||
|
assert( tr_isTorrent( tor ) );
|
||||||
|
|
||||||
ret |= useManditoryFields( tor, fieldsToLoad, ctor );
|
ret |= useManditoryFields( tor, fieldsToLoad, ctor );
|
||||||
fieldsToLoad &= ~ret;
|
fieldsToLoad &= ~ret;
|
||||||
ret |= loadFromFile( tor, fieldsToLoad );
|
ret |= loadFromFile( tor, fieldsToLoad );
|
||||||
|
|
Loading…
Reference in a new issue