diff options
| author | Ted Ross <tross@apache.org> | 2013-10-18 18:20:41 +0000 |
|---|---|---|
| committer | Ted Ross <tross@apache.org> | 2013-10-18 18:20:41 +0000 |
| commit | 7097a4204d85d4c56c227155034674852f6927be (patch) | |
| tree | c0de3201e7663d943085292b73e0562820c9a7ab /qpid/extras/dispatch/python | |
| parent | d155a85d3af1644e9440e64d25ff456c362df8f0 (diff) | |
| download | qpid-python-7097a4204d85d4c56c227155034674852f6927be.tar.gz | |
QPID-5216
- Fixed propagation of the deletion of locally-attached mobile addresses
- Changed 'global' address class to 'mobile' to be consistent
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1533581 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/extras/dispatch/python')
| -rw-r--r-- | qpid/extras/dispatch/python/qpid/dispatch/router/mobile.py | 16 | ||||
| -rw-r--r-- | qpid/extras/dispatch/python/qpid/dispatch/router/router_engine.py | 7 |
2 files changed, 16 insertions, 7 deletions
diff --git a/qpid/extras/dispatch/python/qpid/dispatch/router/mobile.py b/qpid/extras/dispatch/python/qpid/dispatch/router/mobile.py index 0e27910e42..117cf98c22 100644 --- a/qpid/extras/dispatch/python/qpid/dispatch/router/mobile.py +++ b/qpid/extras/dispatch/python/qpid/dispatch/router/mobile.py @@ -145,8 +145,10 @@ class MobileAddressEngine(object): for addr in msg.del_list: _list.remove(addr) self.remote_lists[msg.id] = (msg.mobile_seq, _list) - self.node_tracker.add_addresses(msg.id, msg.add_list) - self.node_tracker.del_addresses(msg.id, msg.del_list) + if msg.add_list: + self.node_tracker.add_addresses(msg.id, msg.add_list) + if msg.del_list: + self.node_tracker.del_addresses(msg.id, msg.del_list) self._activate_remotes(msg.id, msg.add_list, msg.del_list) else: self.needed_mars[(msg.id, msg.area, _seq)] = None @@ -178,8 +180,10 @@ class MobileAddressEngine(object): def _activate_remotes(self, _id, added, deleted): bit = self.node_tracker.maskbit_for_node(_id) - for a in added: - self.container.router_adapter.map_destination(a, bit) - for d in deleted: - self.container.router_adapter.unmap_destination(d, bit) + if added: + for a in added: + self.container.router_adapter.map_destination(a, bit) + if deleted: + for d in deleted: + self.container.router_adapter.unmap_destination(d, bit) diff --git a/qpid/extras/dispatch/python/qpid/dispatch/router/router_engine.py b/qpid/extras/dispatch/python/qpid/dispatch/router/router_engine.py index 5128d175a6..f8b2dd9c94 100644 --- a/qpid/extras/dispatch/python/qpid/dispatch/router/router_engine.py +++ b/qpid/extras/dispatch/python/qpid/dispatch/router/router_engine.py @@ -29,6 +29,9 @@ from mobile import MobileAddressEngine from routing import RoutingTableEngine from node import NodeTracker +import sys +import traceback + ## ## Import the Dispatch adapters from the environment. If they are not found ## (i.e. we are in a test bench, etc.), load the stub versions. @@ -106,7 +109,7 @@ class RouterEngine: try: if addr.find('Mtemp.') == 0: return - if key.find('M') == 0: + if addr.find('M') == 0: self.mobile_address_engine.del_local_address(addr[1:]) except Exception, e: self.log(LOG_ERROR, "Exception in del-address processing: exception=%r" % e) @@ -165,6 +168,8 @@ class RouterEngine: except Exception, e: self.log(LOG_ERROR, "Exception in message processing: opcode=%s body=%r exception=%r" % (opcode, body, e)) + exc_type, exc_value, exc_traceback = sys.exc_info() + traceback.print_tb(exc_traceback) def receive(self, message_properties, body, link_id): |
