1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 01:03:01 +00:00

update peer id to include maintenance number

This commit is contained in:
Mitchell Livingston 2007-04-11 20:27:41 +00:00
parent 546f93177b
commit a5bf61534e

View file

@ -51,11 +51,11 @@ tr_handle_t * tr_init( const char * tag )
return NULL;
}
/* Generate a peer id : "-TRxxyy-" + 12 random alphanumeric
characters, where xx is the major version number and yy the
minor version number (Azureus-style) */
snprintf( h->id, sizeof h->id, "-TR%02d%02d-",
VERSION_MAJOR, VERSION_MINOR );
/* Generate a peer id : "-TRxxyz-" + 12 random alphanumeric
characters, where xx is the major version number, y is the
minor version number, and z is the maintenance number (Azureus-style) */
snprintf( h->id, sizeof h->id, "-TR%02d%01d%01d-",
VERSION_MAJOR, VERSION_MINOR, VERSION_MAINTENANCE );
for( i = 8; i < TR_ID_LEN; i++ )
{
r = tr_rand( 36 );