Ticket #252: ipv6-phase-1-fix-blocklist-test.diff

File ipv6-phase-1-fix-blocklist-test.diff, 2.5 KB (added by jhujhiti, 12 years ago)

Fix libtransmission/blocklist-test.c

  • libtransmission/blocklist-test.c

    diff --git a/libtransmission/blocklist-test.c b/libtransmission/blocklist-test.c
    index 5b6d4d9..50552b4 100644
    a b main( void ) 
    5151    char *         tmpfile_txt = "transmission-blocklist-test.txt";
    5252    char *         tmpfile_bin = "transmission-blocklist-test.bin";
    5353#endif
    54     struct in_addr addr;
     54    tr_address addr;
    5555    int            test = 0;
    5656    tr_blocklist * b;
    5757
    main( void ) 
    6363    _tr_blocklistSetContent( b, tmpfile_txt );
    6464
    6565    /* now run some tests */
    66     check( !tr_netResolve( "216.16.1.143", &addr ) );
     66    check( tr_pton( "216.16.1.143", &addr ) );
    6767    check( !_tr_blocklistHasAddress( b, &addr ) );
    68     check( !tr_netResolve( "216.16.1.144", &addr ) );
     68    check( tr_pton( "216.16.1.144", &addr ) );
    6969    check( _tr_blocklistHasAddress( b, &addr ) );
    70     check( !tr_netResolve( "216.16.1.145", &addr ) );
     70    check( tr_pton( "216.16.1.145", &addr ) );
    7171    check( _tr_blocklistHasAddress( b, &addr ) );
    72     check( !tr_netResolve( "216.16.1.146", &addr ) );
     72    check( tr_pton( "216.16.1.146", &addr ) );
    7373    check( _tr_blocklistHasAddress( b, &addr ) );
    74     check( !tr_netResolve( "216.16.1.147", &addr ) );
     74    check( tr_pton( "216.16.1.147", &addr ) );
    7575    check( _tr_blocklistHasAddress( b, &addr ) );
    76     check( !tr_netResolve( "216.16.1.148", &addr ) );
     76    check( tr_pton( "216.16.1.148", &addr ) );
    7777    check( _tr_blocklistHasAddress( b, &addr ) );
    78     check( !tr_netResolve( "216.16.1.149", &addr ) );
     78    check( tr_pton( "216.16.1.149", &addr ) );
    7979    check( _tr_blocklistHasAddress( b, &addr ) );
    80     check( !tr_netResolve( "216.16.1.150", &addr ) );
     80    check( tr_pton( "216.16.1.150", &addr ) );
    8181    check( _tr_blocklistHasAddress( b, &addr ) );
    82     check( !tr_netResolve( "216.16.1.151", &addr ) );
     82    check( tr_pton( "216.16.1.151", &addr ) );
    8383    check( _tr_blocklistHasAddress( b, &addr ) );
    84     check( !tr_netResolve( "216.16.1.152", &addr ) );
     84    check( tr_pton( "216.16.1.152", &addr ) );
    8585    check( !_tr_blocklistHasAddress( b, &addr ) );
    86     check( !tr_netResolve( "216.16.1.153", &addr ) );
     86    check( tr_pton( "216.16.1.153", &addr ) );
    8787    check( !_tr_blocklistHasAddress( b, &addr ) );
    88     check( !tr_netResolve( "217.0.0.1", &addr ) );
     88    check( tr_pton( "217.0.0.1", &addr ) );
    8989    check( !_tr_blocklistHasAddress( b, &addr ) );
    90     check( !tr_netResolve( "255.0.0.1", &addr ) );
     90    check( tr_pton( "255.0.0.1", &addr ) );
    9191
    9292    /* cleanup */
    9393    _tr_blocklistFree( b );