Ignore:
Timestamp:
May 17, 2012, 5:40:31 PM (9 years ago)
Author:
jordan
Message:

(trunk libT) #4894 -- don't use evbuffer_add_printf() and evbuffer_pullup() together.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/utils.c

    r13191 r13300  
    232232        struct evbuffer * buf = evbuffer_new( );
    233233        char *            base = tr_basename( file );
     234        char *            message;
     235        const char      * str;
    234236
    235237        evbuffer_add_printf( buf, "[%s] ",
     
    242244        evbuffer_add_printf( buf, " (%s:%d)\n", base, line );
    243245        /* FIXME(libevent2) ifdef this out for nonwindows platforms */
    244         OutputDebugString( evbuffer_pullup( buf, -1 ) );
     246        message = evbuffer_free_to_str( buf );
     247        OutputDebugString( message );
    245248        if( fp )
    246             fputs( (const char*)evbuffer_pullup( buf, -1 ), fp );
    247 
     249            fputs( message, fp );
     250
     251        tr_free( message );
    248252        tr_free( base );
    249         evbuffer_free( buf );
    250253    }
    251254}
Note: See TracChangeset for help on using the changeset viewer.