Changeset 12169


Ignore:
Timestamp:
Mar 15, 2011, 5:03:09 PM (11 years ago)
Author:
jordan
Message:

Show whether a tracker is http or udp. Without that context, it could be confusing to see the same tracker twice in a tier

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/details.c

    r12145 r12169  
    17951795    /* hostname */
    17961796    {
    1797         const char * host = st->host;
    1798         const char * pch = strstr( host, "://" );
    1799         if( pch )
    1800             host = pch + 3;
    18011797        g_string_append( gstr, st->isBackup ? "<i>" : "<b>" );
    18021798        if( key )
    1803             str = g_markup_printf_escaped( "%s - %s", host, key );
     1799            str = g_markup_printf_escaped( "%s - %s", st->host, key );
    18041800        else
    1805             str = g_markup_printf_escaped( "%s", host );
     1801            str = g_markup_printf_escaped( "%s", st->host );
    18061802        g_string_append( gstr, str );
    18071803        g_free( str );
  • trunk/libtransmission/announcer.c

    r12167 r12169  
    214214getKey( const char * url )
    215215{
     216    char * ret;
     217    char * scheme = NULL;
     218    char * host = NULL;
    216219    int port = 0;
    217     char * host = NULL;
    218     char * ret;
    219     tr_urlParse( url, -1, NULL, &host, &port, NULL );
    220     ret = tr_strdup_printf( "%s:%d", ( host ? host : "invalid" ), port );
     220
     221    tr_urlParse( url, -1, &scheme, &host, &port, NULL );
     222    ret = tr_strdup_printf( "%s://%s:%d", (scheme?scheme:"invalid"), (host?host:"invalid"), port );
     223
    221224    tr_free( host );
     225    tr_free( scheme );
    222226    return ret;
    223227}
Note: See TracChangeset for help on using the changeset viewer.