From f4c17e9540cb7212ed9fa5a347dd44e6fbaaee9c Mon Sep 17 00:00:00 2001
From: Simon <simon@adlem.net>
Date: Sun, 20 Dec 2020 18:05:19 +0000
Subject: [PATCH] Only ignore openbridge (again)

---
 bridge_master.py | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/bridge_master.py b/bridge_master.py
index dec3578..f0d26da 100755
--- a/bridge_master.py
+++ b/bridge_master.py
@@ -790,9 +790,11 @@ class routerOBP(OPENBRIDGE):
                     logger.debug("(DEDUP) Skipping system %s TS: %s",_target['SYSTEM'],_target['TS'])
                     continue
                 if _target_system['MODE'] == 'OPENBRIDGE':
-                    print(int_id(_target['TGID']))
                     if _noOBP == True:
                         continue
+                    #We want to ignore this system and TS combination if it's called again for this packet
+                    _sysIgnore.append((_target['SYSTEM'],_target['TS']))
+        
                     # Is this a new call stream on the target?
                     if (_stream_id not in _target_status):
                         # This is a new call stream on the target
@@ -926,9 +928,6 @@ class routerOBP(OPENBRIDGE):
                 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']))
                 #Ignore this system and TS pair if it's called again on this packet
-        #We want to ignore this system and TS combination if it's called again for this packet
-            if _target_system['MODE'] == 'OPENBRIDGE':
-                _sysIgnore.append((_target['SYSTEM'],_target['TS']))
         return(_sysIgnore)
 
 
@@ -1065,6 +1064,9 @@ class routerHBP(HBSYSTEM):
                     if _target_system['MODE'] == 'OPENBRIDGE':
                         if _noOBP == True:
                             continue
+                        #We want to ignore this system and TS combination if it's called again for this packet
+                        _sysIgnore.append((_target['SYSTEM'],_target['TS']))
+        
                         # Is this a new call stream on the target?
                         if (_stream_id not in _target_status):
                             # This is a new call stream on the target
@@ -1192,9 +1194,7 @@ class routerHBP(HBSYSTEM):
 
                     # Transmit the packet to the destination system
                     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']))
-            if _target_system['MODE'] == 'OPENBRIDGE':
-                _sysIgnore.append((_target['SYSTEM'],_target['TS']))           
+                    #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']))        
         return _sysIgnore
 
     def dmrd_received(self, _peer_id, _rf_src, _dst_id, _seq, _slot, _call_type, _frame_type, _dtype_vseq, _stream_id, _data):