Changeset 8823
- Timestamp:
- Jul 17, 2009, 5:23:03 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/fdlimit.c
r8791 r8823 84 84 struct tr_openfile 85 85 { 86 tr_bool isCheckedOut;87 86 tr_bool isWritable; 88 87 int torrentId; … … 376 375 tr_close_file( o->fd ); 377 376 o->fd = -1; 378 o->isCheckedOut = FALSE;379 }380 381 static int382 fileIsCheckedOut( const struct tr_openfile * o )383 {384 return fileIsOpen( o ) && o->isCheckedOut;385 377 } 386 378 … … 418 410 continue; 419 411 420 assert( !fileIsCheckedOut( o ) );421 422 412 if( doWrite && !o->isWritable ) 423 413 { … … 484 474 dbgmsg( "checking out '%s' in slot %d", filename, winner ); 485 475 o->torrentId = torrentId; 486 o->isCheckedOut = 1;487 476 o->date = tr_date( ); 488 477 return o->fd; … … 500 489 continue; 501 490 dbgmsg( "releasing file \"%s\"", o->filename ); 502 o->isCheckedOut = FALSE;503 491 break; 504 492 } … … 516 504 continue; 517 505 dbgmsg( "tr_fdFileClose closing \"%s\"", filename ); 518 assert( !o->isCheckedOut && "this is a test assertion... I *think* this is always true now" );519 506 TrCloseFile( o ); 520 507 }
Note: See TracChangeset
for help on using the changeset viewer.