Browse Source

Drop ports from top level of features

master
Neil Booth 8 years ago
parent
commit
9238fe397d
  1. 4
      lib/peer.py
  2. 8
      server/controller.py

4
lib/peer.py

@ -39,9 +39,7 @@ class Peer(object):
# metadata # metadata
'source', 'ip_addr', 'good_ports', 'source', 'ip_addr', 'good_ports',
'last_connect', 'last_try', 'try_count') 'last_connect', 'last_try', 'try_count')
PORTS = ('ssl_port', 'tcp_port') FEATURES = ('pruning', 'server_version', 'protocol_min', 'protocol_max')
FEATURES = PORTS + ('pruning', 'server_version',
'protocol_min', 'protocol_max')
# This should be set by the application # This should be set by the application
DEFAULT_PORTS = {} DEFAULT_PORTS = {}

8
server/controller.py

@ -513,10 +513,12 @@ class Controller(util.LoggedClass):
'Tries', 'Source', 'IP Address') 'Tries', 'Source', 'IP Address')
for item in data: for item in data:
features = item['features'] features = item['features']
yield fmt.format(item['host'][:30], hostname = item['host']
host = features['hosts'][hostname]
yield fmt.format(hostname[:30],
item['status'], item['status'],
features['tcp_port'] or '', host['tcp_port'] or '',
features['ssl_port'] or '', host['ssl_port'] or '',
features['server_version'] or 'unknown', features['server_version'] or 'unknown',
features['protocol_min'], features['protocol_min'],
features['protocol_max'], features['protocol_max'],

Loading…
Cancel
Save