From 26aa6adfd2c705c7e8a36c917d43d738a422b0ca Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 21 Jan 2022 00:03:58 +0000 Subject: [PATCH] Fixing hops --- bridge_master.py | 2 +- hblink.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bridge_master.py b/bridge_master.py index 01093f1..2db382f 100644 --- a/bridge_master.py +++ b/bridge_master.py @@ -1768,7 +1768,7 @@ class routerOBP(OPENBRIDGE): for _system in BRIDGES[_bridge]: if _system['SYSTEM'] == self._system and _system['TGID'] == _dst_id and _system['TS'] == _slot and _system['ACTIVE'] == True: - _sysIgnore = self.to_target(_peer_id, _rf_src, _dst_id, _seq, _slot, _call_type, _frame_type, _dtype_vseq, _stream_id, _data, pkt_time, dmrpkt, _bits,_bridge,_system,False,_sysIgnore) + _sysIgnore = self.to_target(_peer_id, _rf_src, _dst_id, _seq, _slot, _call_type, _frame_type, _dtype_vseq, _stream_id, _data, pkt_time, dmrpkt, _bits,_bridge,_system,False,_sysIgnore,_hops) # Final actions - Is this a voice terminator? diff --git a/hblink.py b/hblink.py index c3fc39b..19799ad 100755 --- a/hblink.py +++ b/hblink.py @@ -137,7 +137,7 @@ class OPENBRIDGE(DatagramProtocol): def dereg(self): logger.info('(%s) is mode OPENBRIDGE. No De-Registration required, continuing shutdown', self._system) - def send_system(self, _packet,_hops = False): + def send_system(self, _packet,_hops = b''): #Don't do anything if we are STUNned if 'STUN' in self._CONFIG: logger.info('(%s) Bridge STUNned, discarding', self._system) @@ -208,7 +208,7 @@ class OPENBRIDGE(DatagramProtocol): - def dmrd_received(self, _peer_id, _rf_src, _dst_id, _seq, _slot, _call_type, _frame_type, _dtype_vseq, _stream_id, _data,_hash,_hops = False): + def dmrd_received(self, _peer_id, _rf_src, _dst_id, _seq, _slot, _call_type, _frame_type, _dtype_vseq, _stream_id, _data,_hash,_hops = b''): pass #print(int_id(_peer_id), int_id(_rf_src), int_id(_dst_id), int_id(_seq), _slot, _call_type, _frame_type, repr(_dtype_vseq), int_id(_stream_id)) @@ -589,7 +589,7 @@ class HBSYSTEM(DatagramProtocol): def updateSockaddr_errback(self,failure): logger.debug('(%s) hostname resolution error: %s',self._system,failure) - def send_peers(self, _packet, _hops = False): + def send_peers(self, _packet, _hops = b''): for _peer in self._peers: self.send_peer(_peer, _packet) #logger.debug('(%s) Packet sent to peer %s', self._system, self._peers[_peer]['RADIO_ID']) @@ -601,7 +601,7 @@ class HBSYSTEM(DatagramProtocol): # KEEP THE FOLLOWING COMMENTED OUT UNLESS YOU'RE DEBUGGING DEEPLY!!!! #logger.debug('(%s) TX Packet to %s on port %s: %s', self._peers[_peer]['RADIO_ID'], self._peers[_peer]['IP'], self._peers[_peer]['PORT'], ahex(_packet)) - def send_master(self, _packet, _hops = False): + def send_master(self, _packet, _hops = b''): if _packet[:4] == DMRD: _packet = b''.join([_packet[:11], self._config['RADIO_ID'], _packet[15:]]) self.transport.write(_packet, self._config['MASTER_SOCKADDR'])