From ad1ede807e0fd425171b870979a95b1cd7442553 Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 21 Apr 2022 01:48:59 +0100 Subject: [PATCH] It was ignoring 0 --- hblink.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hblink.py b/hblink.py index 0a6c44f..b978302 100755 --- a/hblink.py +++ b/hblink.py @@ -439,7 +439,7 @@ class OPENBRIDGE(DatagramProtocol): return #Discard bad source server - if (len(str(int.from_bytes(_source_server,'big'))) < 4) or (len(str(int.from_bytes(_source_server,'big'))) > 7) and int.from_bytes(_source_server,'big') > 0: + if ((len(str(int.from_bytes(_source_server,'big'))) < 4) or (len(str(int.from_bytes(_source_server,'big'))) > 7)) and int.from_bytes(_source_server,'big') > 0: if _stream_id not in self._laststrid: logger.warning('(%s) Source Server should be between 4 and 7 digits, discarding Src: %s', self._system, int.from_bytes(_source_server,'big')) self.send_bcsq(_dst_id,_stream_id)