Changeset 5433


Ignore:
Timestamp:
Mar 29, 2008, 10:16:33 PM (14 years ago)
Author:
charles
Message:

add tr_blocklistExists( const tr_handle * );

Location:
trunk/libtransmission
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/blocklist-test.c

    r5432 r5433  
    6060    /* create our own dummy blocklist */
    6161    createTestBlocklist( tmpfile );
    62     tr_setBlocklist( handle, tmpfile );
     62    tr_blocklistSet( handle, tmpfile );
    6363
    6464    /* now run some tests */
  • trunk/libtransmission/blocklist.c

    r5432 r5433  
    136136}
    137137
     138int
     139tr_blocklistExists( const tr_handle * handle UNUSED )
     140{
     141    struct stat st;
     142    char filename[MAX_PATH_LENGTH];
     143    tr_getBlocklistFilename( filename, sizeof( filename ) );
     144    return !stat( filename, &st );
     145}
     146
     147
    138148void
    139 tr_setBlocklist( tr_handle  * handle,
     149tr_blocklistSet( tr_handle  * handle,
    140150                 const char * filename )
    141151{
  • trunk/libtransmission/transmission.h

    r5429 r5433  
    307307 * Passing NULL for a filename will clear the blocklist.
    308308 */
    309 void tr_setBlocklist( tr_handle  * handle,
     309void tr_blocklistSet( tr_handle  * handle,
    310310                      const char * filename );
     311
     312int tr_blocklistExists( const tr_handle * handle );
    311313
    312314
Note: See TracChangeset for help on using the changeset viewer.