Ignore:
Timestamp:
Nov 29, 2009, 8:05:47 AM (13 years ago)
Author:
charles
Message:

(trunk libT) resolve "noslashes" vs "keep_slashes" variable name inconsistency between the declaration and the definition of tr_http_escape()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/web.c

    r9531 r9626  
    650650
    651651/* escapes a string to be URI-legal as per RFC 2396.
    652    like curl_escape() but can optionally avoid munging slashes. */
     652   like curl_escape() but can optionally avoid escaping slashes. */
    653653void
    654 tr_http_escape( struct evbuffer *out, const char *str, int len, int keep_slashes )
     654tr_http_escape( struct evbuffer  * out,
     655                const char       * str,
     656                int                len,
     657                tr_bool            escape_slashes )
    655658{
    656659    int i;
     660
     661    if( ( len < 0 ) && ( str != NULL ) )
     662        len = strlen( str );
    657663
    658664    for( i = 0; i < len; i++ ) {
     
    674680            break;
    675681        case '/':
    676             if(keep_slashes) {
     682            if(!escape_slashes) {
    677683                evbuffer_add( out, &str[i], 1 );
    678684                break;
Note: See TracChangeset for help on using the changeset viewer.