Changeset 11271


Ignore:
Timestamp:
Sep 29, 2010, 2:38:14 AM (12 years ago)
Author:
charles
Message:

(trukn libT) call tr_close_file() instead of close() after saving a benc file to disk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/bencode.c

    r11079 r11271  
    2828#include <sys/stat.h> /* stat() */
    2929#include <locale.h>
    30 #include <unistd.h> /* stat(), close() */
     30#include <unistd.h> /* stat() */
    3131
    3232#include <event.h> /* struct evbuffer */
     
    3636#include "transmission.h"
    3737#include "bencode.h"
     38#include "fdlimit.h" /* tr_close_file() */
    3839#include "json.h"
    3940#include "list.h"
     
    16831684        {
    16841685            tr_fsync( fd );
    1685             close( fd );
     1686            tr_close_file( fd );
    16861687
    16871688            if( !unlink( filename ) || ( errno == ENOENT ) )
     
    17111712            err = errno;
    17121713            tr_err( _( "Couldn't save temporary file \"%1$s\": %2$s" ), tmp, tr_strerror( err ) );
    1713             close( fd );
     1714            tr_close_file( fd );
    17141715            unlink( tmp );
    17151716        }
Note: See TracChangeset for help on using the changeset viewer.