Changeset 6139


Ignore:
Timestamp:
Jun 11, 2008, 3:17:59 PM (13 years ago)
Author:
charles
Message:

fix ACL parsing error introduced by the shttpd auth code change.

Location:
trunk/libtransmission
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/rpc-server.c

    r6124 r6139  
    311311    }
    312312
    313     /* the -2 is to eat the final ", " */
    314     ret = tr_strndup( (char*) EVBUFFER_DATA(out), EVBUFFER_LENGTH(out)-2 );
     313    /* the -1 is to eat the final ", " */
     314    ret = tr_strndup( (char*) EVBUFFER_DATA(out), EVBUFFER_LENGTH(out)-1 );
    315315    evbuffer_free( out );
    316316    return ret;
  • trunk/libtransmission/rpc-test.c

    r6031 r6139  
    3131    int ok;
    3232    char * str = cidrize( in );
    33 /*fprintf( stderr, "in [%s] out [%s] should be [%s]\n", in, str, expected );*/
     33fprintf( stderr, "in [%s] out [%s] should be [%s]\n", in, str, expected );
    3434    ok = expected ? !strcmp( expected, str ) : !str;
    3535    tr_free( str );
     
    4747    check( testWildcard( "192.64.0.*", "192.64.0.0/24" ) );
    4848    check( testWildcard( "192.64.0.1", "192.64.0.1/32" ) );
    49     check( testWildcard( "+192.*.*.*, -192.64.*.*", "+192.0.0.0/8, -192.64.0.0/16" ) );
     49    check( testWildcard( "+192.*.*.*,-192.64.*.*", "+192.0.0.0/8,-192.64.0.0/16" ) );
    5050
    5151    err = tr_rpcTestACL( NULL, "+192.*.*.*", &errmsg );
     
    5757    tr_free( errmsg );
    5858    errmsg = NULL;
    59     err = tr_rpcTestACL( NULL, "+192.*.*.*, -192.168.*.*", &errmsg );
     59    err = tr_rpcTestACL( NULL, "+192.*.*.*,-192.168.*.*", &errmsg );
    6060    check( !err );
    6161    check( !errmsg );
Note: See TracChangeset for help on using the changeset viewer.