]> granicus.if.org Git - transmission/commitdiff
(trunk libT) #2429: add some more assertions to help smoke out this bug
authorCharles Kerr <charles@transmissionbt.com>
Mon, 28 Sep 2009 18:22:57 +0000 (18:22 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Mon, 28 Sep 2009 18:22:57 +0000 (18:22 +0000)
libtransmission/resume.c

index 92b036a322fe544e0992279d28ba0e505c3f6222..1b7ed6d95b1cb6e800ee82b6aa29d7fadd42896f 100644 (file)
@@ -549,6 +549,8 @@ loadFromFile( tr_torrent * tor,
     tr_bool boolVal;
     const tr_bool  wasDirty = tor->isDirty;
 
+    assert( tr_isTorrent( tor ) );
+
     filename = getResumeFilename( tor );
 
     if( tr_bencLoadFile( &top, TR_FMT_BENC, filename ) )
@@ -730,6 +732,8 @@ tr_torrentLoadResume( tr_torrent *    tor,
 {
     uint64_t ret = 0;
 
+    assert( tr_isTorrent( tor ) );
+
     ret |= useManditoryFields( tor, fieldsToLoad, ctor );
     fieldsToLoad &= ~ret;
     ret |= loadFromFile( tor, fieldsToLoad );