Merge pull request #35 from ea5gvk/pruebas

Fix: proteger to_target() contra KeyError si bridge fue eliminado durante enrutamiento
pull/37/head
Joaquin Madrid Belando 2 months ago committed by GitHub
commit 16e2202134
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1923,6 +1923,8 @@ class routerOBP(OPENBRIDGE):
def to_target(self, _peer_id, _rf_src, _dst_id, _seq, _slot, _call_type, _frame_type, _dtype_vseq, _stream_id, _data, pkt_time, dmrpkt, _bits,_bridge,_system,_noOBP,sysIgnore, _hops = b'', _source_server = b'\x00\x00\x00\x00', _ber = b'\x00', _rssi = b'\x00', _source_rptr = b'\x00\x00\x00\x00'):
_sysIgnore = sysIgnore
if _bridge not in BRIDGES:
return _sysIgnore
for _target in BRIDGES[_bridge]:
if (_target['SYSTEM'] != self._system) and (_target['ACTIVE']):
_target_status = systems[_target['SYSTEM']].STATUS
@ -2593,6 +2595,8 @@ class routerHBP(HBSYSTEM):
def to_target(self, _peer_id, _rf_src, _dst_id, _seq, _slot, _call_type, _frame_type, _dtype_vseq, _stream_id, _data, pkt_time, dmrpkt, _bits,_bridge,_system,_noOBP,sysIgnore,_source_server, _ber, _rssi, _source_rptr):
_sysIgnore = sysIgnore
if _bridge not in BRIDGES:
return _sysIgnore
for _target in BRIDGES[_bridge]:
#if _target['SYSTEM'] != self._system or (_target['SYSTEM'] == self._system and _target['TS'] != _slot):
if _target['SYSTEM'] != self._system and _target['ACTIVE']:

Loading…
Cancel
Save

Powered by TurnKey Linux.