From 0aa3f57a08576db925bcbda22d5f283671e3824b Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 16 Nov 2020 20:45:02 +0000 Subject: [PATCH] Preserve peers in config dict --- bridge_master.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bridge_master.py b/bridge_master.py index 9e60a83..a5002a5 100755 --- a/bridge_master.py +++ b/bridge_master.py @@ -598,7 +598,7 @@ def mysql_config_check(): make_static_tg(tg,2,_tmout,system) continue - + if SQLCONFIG[system]['ENABLED'] == False and CONFIG['SYSTEMS'][system]['ENABLED'] == True: logger.debug('(MYSQL) %s changed from enabled to disabled, killing HBP listener and removing from bridges',system) systems[system].master_dereg() @@ -762,6 +762,10 @@ def mysql_config_check(): if SQLCONFIG[system]['TG2_ACL'] != CONFIG['SYSTEMS'][system]['TG2_ACL']: logger.debug('(MYSQL) TG2 ACL changed') + #Preserve peers list + if system in CONFIG['SYSTEMS']: + SQLCONFIG[system]['PEERS'] = CONFIG['SYSTEMS'][system]['PEERS'] + #Add MySQL config data to config dict CONFIG['SYSTEMS'].update(SQLCONFIG) @@ -1177,9 +1181,7 @@ class routerHBP(HBSYSTEM): systems[_target['SYSTEM']].send_system(_tmp_data) #logger.debug('(%s) Packet routed by bridge: %s to system: %s TS: %s, TGID: %s', self._system, _bridge, _target['SYSTEM'], _target['TS'], int_id(_target['TGID'])) - - def dmrd_received(self, _peer_id, _rf_src, _dst_id, _seq, _slot, _call_type, _frame_type, _dtype_vseq, _stream_id, _data): pkt_time = time() dmrpkt = _data[20:53]