Ignore:
Timestamp:
Apr 29, 2008, 8:34:15 PM (14 years ago)
Author:
livings124
Message:

minor adjustments to the client code, and keeping the code pg

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/clients.c

    r5725 r5727  
    5353
    5454static const char*
    55 getMnemonic( char ch )
     55getMnemonicEnd( char ch )
    5656{
    5757    switch( ch )
    5858    {
    59         case 'b': case 'B': return "Beta";
    60         case 'd': return "Debug";
    61         case 'x': case 'X': case 'Z': return "(Dev)";
     59        case 'b': case 'B': return " (Beta)";
     60        case 'd': return " (Debug)";
     61        case 'x': case 'X': case 'Z': return " (Dev)";
    6262        default: return "";
    6363    }
     
    131131        if( !memcmp( id+1, "UT", 2 ) )
    132132        {
    133             snprintf( buf, buflen, "\xc2\xb5Torrent %d.%d.%d %s",
    134                       strint(id+3,1), strint(id+4,1), strint(id+5,1), getMnemonic(id[6]) );
    135         }
    136 
    137         /* we win the most fucked-up peer_id award!  hooray! */
     133            snprintf( buf, buflen, "\xc2\xb5Torrent %d.%d.%d%s",
     134                      strint(id+3,1), strint(id+4,1), strint(id+5,1), getMnemonicEnd(id[6]) );
     135        }
     136
    138137        else if( !memcmp( id+1, "TR", 2 ) )
    139138        {
     
    141140                snprintf( buf, buflen, "Transmission 0.%c", id[6] );
    142141            else if( !memcmp( id+3, "00", 2) ) /* previous client style: -TR0072- is 0.72 */
    143                 snprintf( buf, buflen, "Transmission %d.%02d", strint(id+3,2), strint(id+5,2) );
     142                snprintf( buf, buflen, "Transmission 0.%02d", strint(id+5,2) );
    144143            else /* current client style: -TR072Z- is 0.72 (Dev) */
    145                 snprintf( buf, buflen, "Transmission %d.%02d %s", strint(id+3,1), strint(id+4,2), getMnemonic(id[6]) );
     144                snprintf( buf, buflen, "Transmission %d.%02d%s", strint(id+3,1), strint(id+4,2), getMnemonicEnd(id[6]) );
    146145        }
    147146
     
    301300    else if( !memcmp( id, "XBT", 3 ) )
    302301    {
    303         snprintf( buf, buflen, "XBT Client %c.%c.%c %s", id[3], id[4], id[5], getMnemonic(id[6]) );
     302        snprintf( buf, buflen, "XBT Client %c.%c.%c%s", id[3], id[4], id[5], getMnemonicEnd(id[6]) );
    304303    }
    305304    else if( !memcmp( id, "Mbrst", 5 ) )
Note: See TracChangeset for help on using the changeset viewer.