Ignore:
Timestamp:
Aug 13, 2009, 5:25:26 PM (13 years ago)
Author:
charles
Message:

(trunk libT) fix #2332: filesystem-based error messages lack context

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.c

    r8910 r8912  
    1919#include <limits.h> /* INT_MAX */
    2020#include <math.h> /* fabs */
     21#include <stdarg.h>
    2122#include <string.h> /* memcmp */
    2223#include <stdlib.h> /* qsort */
     
    263264***/
    264265
     266void
     267tr_torrentSetLocalError( tr_torrent * tor, const char * fmt, ... )
     268{
     269    va_list ap;
     270
     271    assert( tr_isTorrent( tor ) );
     272
     273    va_start( ap, fmt );
     274    tor->error = TR_STAT_LOCAL_ERROR;
     275    evutil_vsnprintf( tor->errorString, sizeof( tor->errorString ), fmt, ap );
     276    va_end( ap );
     277}
     278
    265279static void
    266280onTrackerResponse( void * tracker UNUSED,
    267                    void *         vevent,
    268                    void *         user_data )
     281                   void * vevent,
     282                   void * user_data )
    269283{
    270284    tr_torrent *       tor = user_data;
Note: See TracChangeset for help on using the changeset viewer.