Skip to content

Commit

Permalink
remove old hardcode stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
wiedehopf committed Aug 31, 2024
1 parent d130fab commit f30de38
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 17 deletions.
2 changes: 0 additions & 2 deletions mlat-client
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ location pin from the coverage maps.""",
uuid = [ args.uuid ]
if args.uuid_path is not None:
uuid_path = [ args.uuid_path ]
else:
uuid_path = [ '/usr/local/share/adsbexchange/adsbx-uuid', '/boot/adsbx-uuid' ]

server = JsonServerConnection(host=args.server[0],
port=args.server[1],
Expand Down
2 changes: 1 addition & 1 deletion mlat/client/jsonclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ class JsonServerConnection(mlat.client.net.ReconnectingConnection):

def __init__(self, host, port, uuid_path, uuid, handshake_data, offer_zlib, offer_udp, return_results):
super().__init__(host, port)
self.uuid_path = uuid_path
self.uuid_path = uuid_path or []
self.handshake_data = handshake_data
self.offer_zlib = offer_zlib
self.offer_udp = offer_udp
Expand Down
14 changes: 0 additions & 14 deletions mlat/client/net.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,6 @@ def __init__(self, host, port):
asyncore.dispatcher.__init__(self)
self.host = host
self.port = port
# check port as well, if port doesn't match, could be direct MLAT
if self.host == 'feed.adsbexchange.com' and port == 31090:
self.adsbexchange = True
else:
self.adsbexchange = False
self.adsbexchangePortIndex = 0
self.adsbexchangeHostIndex = 0
self.adsbexchangePorts = [ 31090, 64590 ]
self.adsbexchangeHosts = [ 'feed1.adsbexchange.com', 'feed2.adsbexchange.com' ]
self.addrlist = []
self.state = 'disconnected'
self.reconnect_at = None
Expand Down Expand Up @@ -166,11 +157,6 @@ def reconnect(self):

if len(self.addrlist) == 0:
# ran out of addresses to try, resolve it again
if self.adsbexchange:
self.adsbexchangePortIndex = (self.adsbexchangePortIndex + 1) % len(self.adsbexchangePorts)
self.adsbexchangeHostIndex = (self.adsbexchangeHostIndex + 1) % len(self.adsbexchangeHosts)
self.host = self.adsbexchangeHosts[self.adsbexchangeHostIndex];
self.port = self.adsbexchangePorts[self.adsbexchangePortIndex];

self.addrlist = socket.getaddrinfo(host=self.host,
port=self.port,
Expand Down

0 comments on commit f30de38

Please sign in to comment.