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/peer-io.c

    r12225 r12229  
    592592{
    593593    assert( session );
    594     assert( tr_isAddress( addr ) );
     594    assert( tr_address_is_valid( addr ) );
    595595
    596596    return tr_peerIoNew( session, parent, addr, port, NULL, true, false,
     
    611611
    612612    assert( session );
    613     assert( tr_isAddress( addr ) );
     613    assert( tr_address_is_valid( addr ) );
    614614    assert( torrentHash );
    615615
     
    806806{
    807807    static char buf[512];
    808 
    809     if( addr->type == TR_AF_INET )
    810         tr_snprintf( buf, sizeof( buf ), "%s:%u", tr_ntop_non_ts( addr ), ntohs( port ) );
    811     else
    812         tr_snprintf( buf, sizeof( buf ), "[%s]:%u", tr_ntop_non_ts( addr ), ntohs( port ) );
     808    tr_snprintf( buf, sizeof( buf ), "[%s]:%u", tr_address_to_string( addr ), ntohs( port ) );
    813809    return buf;
    814810}
Note: See TracChangeset for help on using the changeset viewer.