Changeset 6586


Ignore:
Timestamp:
Aug 18, 2008, 9:02:58 PM (13 years ago)
Author:
charles
Message:

(1.33 libT) recognize BitSpirit? peer ids. This is a backport from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.3x/libtransmission/clients.c

    r6489 r6586  
    134134
    135135    return TRUE;
     136}
     137
     138static int
     139decodeBitSpiritClient( char * buf, size_t buflen, const uint8_t * id )
     140{
     141    const int isBS = !memcmp( id+2, "BS", 2 );
     142    if( isBS )
     143    {
     144        const int version = id[1] ? id[1] : 1;
     145        tr_snprintf( buf, buflen, "BitSpirit v%d", version );
     146    }
     147    return isBS;
    136148}
    137149
     
    292304    if( decodeBitCometClient( buf, buflen, id ) )
    293305        return;
     306    if( decodeBitSpiritClient( buf, buflen, id ) )
     307        return;
    294308
    295309    /* Clients with no version */
Note: See TracChangeset for help on using the changeset viewer.