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/announcer-http.c

    r13191 r13300  
    5151}
    5252
    53 static struct evbuffer *
     53static char*
    5454announce_url_new( const tr_session * session, const tr_announce_request * req )
    5555{
     
    117117    }
    118118
    119     return buf;
     119    return evbuffer_free_to_str( buf );
    120120}
    121121
     
    288288{
    289289    struct announce_data * d;
    290     struct evbuffer * buf = announce_url_new( session, request );
    291     const char * url = (const char *) evbuffer_pullup( buf, -1 );
     290    char * url = announce_url_new( session, request );
    292291
    293292    d = tr_new0( struct announce_data, 1 );
     
    303302    tr_webRun( session, url, NULL, NULL, on_announce_done, d );
    304303
    305     evbuffer_free( buf );
     304    tr_free( url );
    306305}
    307306
     
    430429}
    431430
    432 static struct evbuffer *
     431static char *
    433432scrape_url_new( const tr_scrape_request * req )
    434433{
     
    447446    }
    448447
    449     return buf;
     448    return evbuffer_free_to_str( buf );
    450449}
    451450
     
    458457    int i;
    459458    struct scrape_data * d;
    460     struct evbuffer * buf = scrape_url_new( request );
    461     const char * url = (const char *) evbuffer_pullup( buf, -1 );
     459    char * url = scrape_url_new( request );
    462460
    463461    d = tr_new0( struct scrape_data, 1 );
     
    478476    tr_webRun( session, url, NULL, NULL, on_scrape_done, d );
    479477
    480     evbuffer_free( buf );
    481 }
     478    tr_free( url );
     479}
Note: See TracChangeset for help on using the changeset viewer.