Changeset 8935


Ignore:
Timestamp:
Aug 15, 2009, 3:52:10 PM (13 years ago)
Author:
charles
Message:

(trunk libT) remove dead code noticed by geirha

Location:
trunk/libtransmission
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/fdlimit.c

    r8889 r8935  
    479479
    480480void
    481 tr_fdFileReturn( int fd )
    482 {
    483     struct tr_openfile * o;
    484     const struct tr_openfile * end;
    485 
    486     for( o=gFd->openFiles, end=o+gFd->openFileLimit; o!=end; ++o )
    487     {
    488         if( o->fd != fd )
    489             continue;
    490         dbgmsg( "releasing file \"%s\"", o->filename );
    491         break;
    492     }
    493 }
    494 
    495 void
    496481tr_fdFileClose( const char * filename )
    497482{
  • trunk/libtransmission/fdlimit.h

    r8725 r8935  
    5454 * A small pool of open files is kept to avoid the overhead of
    5555 * continually opening and closing the same files when downloading
    56  * piece data.    It's also used to ensure only one caller can
    57  * write to the file at a time.  Callers check out a file, use it,
    58  * and then check it back in via tr_fdFileReturn() when done.
     56 * piece data.
    5957 *
    6058 * - if `folder' doesn't exist, errno is set to ENOENT.
     
    6563 * on failure, a -1 is returned and errno is set.
    6664 *
    67  * @see tr_fdFileReturn
    6865 * @see tr_fdFileClose
    6966 */
     
    7673
    7774/**
    78  * Returns an fd from tr_fdFileCheckout() so that other clients may borrow it.
    79  *
    80  * @see tr_fdFileCheckout
    81  * @see tr_fdFileClose
    82  */
    83 void tr_fdFileReturn( int file );
    84 
    85 /**
    8675 * Closes a file that's being held by our file repository.
    8776 *
     
    9079 *
    9180 * @see tr_fdFileCheckout
    92  * @see tr_fdFileReturn
    9381 */
    9482void     tr_fdFileClose( const char * filename );
  • trunk/libtransmission/inout.c

    r8912 r8935  
    114114        tr_statsFileCreated( tor->session );
    115115
    116     if( fd >= 0 )
    117         tr_fdFileReturn( fd );
    118 
    119116    return err;
    120117}
Note: See TracChangeset for help on using the changeset viewer.