From 36a817cbb1753416209ded76ebb0ff454f260c45 Mon Sep 17 00:00:00 2001 From: Simon Date: Wed, 19 Jan 2022 16:33:00 +0000 Subject: [PATCH] noho --- hblink.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hblink.py b/hblink.py index d1efbc6..00530d4 100755 --- a/hblink.py +++ b/hblink.py @@ -206,7 +206,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): + def dmrd_received(self, _peer_id, _rf_src, _dst_id, _seq, _slot, _call_type, _frame_type, _dtype_vseq, _stream_id, _data,_hash,_hops): 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)) @@ -299,7 +299,7 @@ class OPENBRIDGE(DatagramProtocol): return # Userland actions -- typically this is the function you subclass for an application - self.dmrd_received(_peer_id, _rf_src, _dst_id, _seq, _slot, _call_type, _frame_type, _dtype_vseq, _stream_id, _data,_hash) + self.dmrd_received(_peer_id, _rf_src, _dst_id, _seq, _slot, _call_type, _frame_type, _dtype_vseq, _stream_id, _data,_hash,_hops) #Silently treat a DMRD packet like a keepalive - this is because it's traffic and the #Other end may not have enabled ENAHNCED_OBP self._config['_bcka'] = time() @@ -394,7 +394,8 @@ class OPENBRIDGE(DatagramProtocol): #_data = b''.join([_data[:5],_data[12:]]) _data = b''.join([DMRD,_data[4:]]) # Userland actions -- typically this is the function you subclass for an application - self.dmrd_received(_peer_id, _rf_src, _dst_id, _seq, _slot, _call_type, _frame_type, _dtype_vseq, _stream_id, _data,_hash) + _hops = bytes(int(_hops) + 1) + self.dmrd_received(_peer_id, _rf_src, _dst_id, _seq, _slot, _call_type, _frame_type, _dtype_vseq, _stream_id, _data,_hash,_hops) #Silently treat a DMRD packet like a keepalive - this is because it's traffic and the #Other end may not have enabled ENAHNCED_OBP self._config['_bcka'] = time()