Changeset 9584


Ignore:
Timestamp:
Nov 26, 2009, 6:15:29 AM (13 years ago)
Author:
livings124
Message:

add LTEP to type of peers in the inspector

Location:
trunk/macosx
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/InfoWindowController.m

    r9583 r9584  
    10301030                [components addObject: NSLocalizedString(@"From: distributed hash table", "Inspector -> Peers tab -> table row tooltip")];
    10311031                break;
     1032            case TR_PEER_FROM_LTEP:
     1033                [components addObject: NSLocalizedString(@"From: libtorrent extension protocol handshake",
     1034                                        "Inspector -> Peers tab -> table row tooltip")];
     1035                break;
    10321036            default:
    10331037                NSAssert1(NO, @"Peer from unknown source: %d", peerFrom);
     
    15041508                [fromComponents addObject: [NSString stringWithFormat:
    15051509                                        NSLocalizedString(@"%d DHT", "Inspector -> Peers tab -> peers"), count]];
     1510            if ((count = [torrent totalPeersLTEP]) > 0)
     1511                [fromComponents addObject: [NSString stringWithFormat:
     1512                                        NSLocalizedString(@"%d LTEP", "Inspector -> Peers tab -> peers"), count]];
    15061513           
    15071514            NSMutableArray * upDownComponents = [NSMutableArray arrayWithCapacity: 3];
  • trunk/macosx/Torrent.h

    r9577 r9584  
    182182- (NSInteger) totalPeersPex;
    183183- (NSInteger) totalPeersDHT;
     184- (NSInteger) totalPeersLTEP;
    184185- (NSInteger) totalPeersKnown;
    185186
  • trunk/macosx/Torrent.m

    r9583 r9584  
    11581158{
    11591159    return fStat->peersFrom[TR_PEER_FROM_DHT];
     1160}
     1161
     1162- (NSInteger) totalPeersLTEP
     1163{
     1164    return fStat->peersFrom[TR_PEER_FROM_LTEP];
    11601165}
    11611166
Note: See TracChangeset for help on using the changeset viewer.