From 091a56d4ca09ca4b0bfd5e31a2f9e00d5fab57d5 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Mon, 16 Jul 2007 21:57:22 +0000 Subject: [PATCH] identify dev builds of transmission correctly in the peers list --- libtransmission/clients.c | 6 +++--- libtransmission/transmission.c | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/libtransmission/clients.c b/libtransmission/clients.c index 4ff670fbb..eadbf1eeb 100644 --- a/libtransmission/clients.c +++ b/libtransmission/clients.c @@ -55,9 +55,9 @@ char * tr_clientForId( uint8_t * id ) } else { - asprintf( &ret, "Transmission %d.%c%c", - charToInt( id[3] ) * 10 + charToInt( id[4] ), - id[5], id[6] ); + asprintf( &ret, "Transmission %d.%c%c%s", + charToInt( id[3] ), id[4], id[5], + id[6] == 'Z' ? " (dev)" : "" ); } } else if( !memcmp( &id[1], "AZ", 2 ) ) diff --git a/libtransmission/transmission.c b/libtransmission/transmission.c index 4b7fe937f..27d2fe232 100644 --- a/libtransmission/transmission.c +++ b/libtransmission/transmission.c @@ -28,9 +28,10 @@ #include "net.h" #include "shared.h" -/* 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) */ +/* Generate a peer id : "-TRxyzb-" + 12 random alphanumeric + characters, where x is the major version number, y is the + minor version number, z is the maintenance number, and b + designates beta (Azureus-style) */ void tr_peerIdNew ( char * buf, int buflen ) {