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/rpc-server.c

    r12226 r12229  
    690690        addr.addr.addr4 = server->bindAddress;
    691691        server->httpd = evhttp_new( server->session->event_base );
    692         evhttp_bind_socket( server->httpd, tr_ntop_non_ts( &addr ), server->port );
     692        evhttp_bind_socket( server->httpd, tr_address_to_string( &addr ), server->port );
    693693        evhttp_set_gencb( server->httpd, handle_request, server );
    694694
     
    887887    addr.type = TR_AF_INET;
    888888    addr.addr.addr4 = server->bindAddress;
    889     return tr_ntop_non_ts( &addr );
     889    return tr_address_to_string( &addr );
    890890}
    891891
     
    969969    found = tr_bencDictFindStr( settings, TR_PREFS_KEY_RPC_BIND_ADDRESS, &str );
    970970    assert( found );
    971     if( tr_pton( str, &address ) == NULL ) {
     971    if( !tr_address_from_string( &address, str ) ) {
    972972        tr_err( _( "%s is not a valid address" ), str );
    973973        address = tr_inaddr_any;
Note: See TracChangeset for help on using the changeset viewer.