1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 09:13:06 +00:00

IP address in peer table

This commit is contained in:
Mitchell Livingston 2006-08-14 22:59:30 +00:00
parent f41a6ade33
commit d232d371b5
4 changed files with 8 additions and 1 deletions

View file

@ -93,10 +93,14 @@ char * tr_clientForId( uint8_t * id )
if( !ret )
{
if (id[0] != 0)
{
asprintf( &ret, "unknown client (%c%c%c%c%c%c%c%c)",
id[0], id[1], id[2], id[3], id[4], id[5], id[6], id[7] );
}
else
{
asprintf( &ret, "unknown client" );
}
}
return ret;

View file

@ -451,8 +451,10 @@
return [[peer objectForKey: @"UL To"] boolValue] ? @"Y" : @"";
else if ([ident isEqualToString: @"DL From"])
return [[peer objectForKey: @"DL From"] boolValue] ? @"Y" : @"";
else
else if ([ident isEqualToString: @"Client"])
return [peer objectForKey: @"Client"];
else
return [peer objectForKey: @"IP"];
}
else
{

View file

@ -528,6 +528,7 @@
peer = peers[i];
[peerDics addObject: [NSDictionary dictionaryWithObjectsAndKeys:
[NSString stringWithCString: (char *) peer.addr encoding: NSUTF8StringEncoding], @"IP",
[NSString stringWithCString: (char *) peer.client encoding: NSUTF8StringEncoding], @"Client",
[NSNumber numberWithBool: peer.isDownloading], @"UL To",
[NSNumber numberWithBool: peer.isUploading], @"DL From", nil]];