Ignore:
Timestamp:
Nov 16, 2009, 11:29:26 PM (12 years ago)
Author:
livings124
Message:

clean up bitspirit a bit more

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/clients.c

    r9525 r9526  
    145145
    146146    return TRUE;
    147 }
    148 
    149 static int
    150 decodeBitSpiritClient( char * buf, size_t buflen, const uint8_t * id )
    151 {
    152     const int isBS = !memcmp( id+2, "BS", 2 );
    153     if( isBS )
    154     {
    155         const int version = id[1] ? id[1] : 1;
    156         tr_snprintf( buf, buflen, "BitSpirit v%d", version );
    157     }
    158     return isBS;
    159147}
    160148
     
    313301    if( decodeBitCometClient( buf, buflen, id ) )
    314302        return;
    315     if( decodeBitSpiritClient( buf, buflen, id ) )
    316         return;
    317303
    318304    /* Clients with no version */
     
    374360        three_digits( buf, buflen, "BitSpirit", id+3 );
    375361    }
    376     else if( '\0' == id[0] && !memcmp( &id[1], "BS", 2 ) )
     362    else if( '\0' == id[0] && !memcmp( id+2, "BS", 2 ) )
    377363    {
    378364        tr_snprintf( buf, buflen, "BitSpirit %u", ( id[1] == 0 ? 1 : id[1] ) );
Note: See TracChangeset for help on using the changeset viewer.