You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by tr...@apache.org on 2014/02/21 16:03:52 UTC

svn commit: r1570597 - in /qpid/dispatch/branches/0.2/python/qpid_dispatch_internal/router: data.py mobile.py

Author: tross
Date: Fri Feb 21 15:03:52 2014
New Revision: 1570597

URL: http://svn.apache.org/r1570597
Log:
DISPATCH-29 - Ported fix to 0.2 release branch

Modified:
    qpid/dispatch/branches/0.2/python/qpid_dispatch_internal/router/data.py
    qpid/dispatch/branches/0.2/python/qpid_dispatch_internal/router/mobile.py

Modified: qpid/dispatch/branches/0.2/python/qpid_dispatch_internal/router/data.py
URL: http://svn.apache.org/viewvc/qpid/dispatch/branches/0.2/python/qpid_dispatch_internal/router/data.py?rev=1570597&r1=1570596&r2=1570597&view=diff
==============================================================================
--- qpid/dispatch/branches/0.2/python/qpid_dispatch_internal/router/data.py (original)
+++ qpid/dispatch/branches/0.2/python/qpid_dispatch_internal/router/data.py Fri Feb 21 15:03:52 2014
@@ -239,9 +239,9 @@ class MessageMAU(object):
         _add = ''
         _del = ''
         _exist = ''
-        if self.add_list:   _add   = ' add=%r'   % self.add_list
-        if self.del_list:   _del   = ' del=%r'   % self.del_list
-        if self.exist_list: _exist = ' exist=%r' % self.exist_list
+        if self.add_list != None:   _add   = ' add=%r'   % self.add_list
+        if self.del_list != None:   _del   = ' del=%r'   % self.del_list
+        if self.exist_list != None: _exist = ' exist=%r' % self.exist_list
         return "MAU(id=%s area=%s mobile_seq=%d%s%s%s)" % \
                 (self.id, self.area, self.mobile_seq, _add, _del, _exist)
 
@@ -249,9 +249,9 @@ class MessageMAU(object):
         body = { 'id'         : self.id,
                  'area'       : self.area,
                  'mobile_seq' : self.mobile_seq }
-        if self.add_list:   body['add']   = self.add_list
-        if self.del_list:   body['del']   = self.del_list
-        if self.exist_list: body['exist'] = self.exist_list
+        if self.add_list != None:   body['add']   = self.add_list
+        if self.del_list != None:   body['del']   = self.del_list
+        if self.exist_list != None: body['exist'] = self.exist_list
         return body
 
 

Modified: qpid/dispatch/branches/0.2/python/qpid_dispatch_internal/router/mobile.py
URL: http://svn.apache.org/viewvc/qpid/dispatch/branches/0.2/python/qpid_dispatch_internal/router/mobile.py?rev=1570597&r1=1570596&r2=1570597&view=diff
==============================================================================
--- qpid/dispatch/branches/0.2/python/qpid_dispatch_internal/router/mobile.py (original)
+++ qpid/dispatch/branches/0.2/python/qpid_dispatch_internal/router/mobile.py Fri Feb 21 15:03:52 2014
@@ -114,7 +114,7 @@ class MobileAddressEngine(object):
         if msg.id == self.id:
             return
 
-        if msg.exist_list:
+        if msg.exist_list != None:
             ##
             ## Absolute MAU
             ##
@@ -145,9 +145,9 @@ class MobileAddressEngine(object):
                         for addr in msg.del_list:
                             _list.remove(addr)
                     self.remote_lists[msg.id] = (msg.mobile_seq, _list)
-                    if msg.add_list:
+                    if msg.add_list != None:
                         self.node_tracker.add_addresses(msg.id, msg.add_list)
-                    if msg.del_list:
+                    if msg.del_list != None:
                         self.node_tracker.del_addresses(msg.id, msg.del_list)
                     self._activate_remotes(msg.id, msg.add_list, msg.del_list)
                 else:
@@ -181,10 +181,10 @@ class MobileAddressEngine(object):
 
     def _activate_remotes(self, _id, added, deleted):
         bit = self.node_tracker.maskbit_for_node(_id)
-        if added:
+        if added != None:
             for a in added:
                 self.container.router_adapter.map_destination(a, bit)
-        if deleted:
+        if deleted != None:
             for d in deleted:
                 self.container.router_adapter.unmap_destination(d, bit)
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org