Ignore:
Timestamp:
Mar 25, 2011, 5:34:26 AM (11 years ago)
Author:
jordan
Message:

(trunk libT) API cleanup of the tr_address functions to make them more consistent.

This is loosely related to #2910, but only in the sense of laying the groundwork for #2910's fix...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/blocklist-test.c

    r12223 r12229  
    6969
    7070    /* now run some tests */
    71     check( tr_pton( "216.16.1.143", &addr ) );
     71    check( tr_address_from_string( &addr, "216.16.1.143" ) );
    7272    check( !_tr_blocklistHasAddress( b, &addr ) );
    73     check( tr_pton( "216.16.1.144", &addr ) );
     73    check( tr_address_from_string( &addr, "216.16.1.144" ) );
    7474    check( _tr_blocklistHasAddress( b, &addr ) );
    75     check( tr_pton( "216.16.1.145", &addr ) );
     75    check( tr_address_from_string( &addr, "216.16.1.145" ) );
    7676    check( _tr_blocklistHasAddress( b, &addr ) );
    77     check( tr_pton( "216.16.1.146", &addr ) );
     77    check( tr_address_from_string( &addr, "216.16.1.146" ) );
    7878    check( _tr_blocklistHasAddress( b, &addr ) );
    79     check( tr_pton( "216.16.1.147", &addr ) );
     79    check( tr_address_from_string( &addr, "216.16.1.147" ) );
    8080    check( _tr_blocklistHasAddress( b, &addr ) );
    81     check( tr_pton( "216.16.1.148", &addr ) );
     81    check( tr_address_from_string( &addr, "216.16.1.148" ) );
    8282    check( _tr_blocklistHasAddress( b, &addr ) );
    83     check( tr_pton( "216.16.1.149", &addr ) );
     83    check( tr_address_from_string( &addr, "216.16.1.149" ) );
    8484    check( _tr_blocklistHasAddress( b, &addr ) );
    85     check( tr_pton( "216.16.1.150", &addr ) );
     85    check( tr_address_from_string( &addr, "216.16.1.150" ) );
    8686    check( _tr_blocklistHasAddress( b, &addr ) );
    87     check( tr_pton( "216.16.1.151", &addr ) );
     87    check( tr_address_from_string( &addr, "216.16.1.151" ) );
    8888    check( _tr_blocklistHasAddress( b, &addr ) );
    89     check( tr_pton( "216.16.1.152", &addr ) );
     89    check( tr_address_from_string( &addr, "216.16.1.152" ) );
    9090    check( !_tr_blocklistHasAddress( b, &addr ) );
    91     check( tr_pton( "216.16.1.153", &addr ) );
     91    check( tr_address_from_string( &addr, "216.16.1.153" ) );
    9292    check( !_tr_blocklistHasAddress( b, &addr ) );
    93     check( tr_pton( "217.0.0.1", &addr ) );
     93    check( tr_address_from_string( &addr, "217.0.0.1" ) );
    9494    check( !_tr_blocklistHasAddress( b, &addr ) );
    95     check( tr_pton( "255.0.0.1", &addr ) );
     95    check( tr_address_from_string( &addr, "255.0.0.1" ) );
    9696
    9797    /* cleanup */
Note: See TracChangeset for help on using the changeset viewer.