daemon: Use a set to store broker handlers.

This commit is contained in:
Tom Goff 2016-10-12 15:55:30 +00:00
parent bcd749578d
commit 31a9f6fb34
5 changed files with 5 additions and 5 deletions

View file

@ -54,7 +54,7 @@ class CoreBroker(ConfigurableManager):
# list of node numbers that are PhysicalNode nodes
self.phys = []
# allows for other message handlers to process API messages (e.g. EMANE)
self.handlers = ()
self.handlers = set()
# dict with tunnel key to tunnel device mapping
self.tunnels = {}
self.dorecvloop = False

View file

@ -67,7 +67,7 @@ class Emane(ConfigurableManager):
self.logversion()
# model for global EMANE configuration options
self.emane_config = EmaneGlobalModel(session, None, self.verbose)
session.broker.handlers += (self.handledistributed, )
session.broker.handlers.add(self.handledistributed)
self.loadmodels()
self.service = None

View file

@ -33,7 +33,7 @@ class MobilityManager(ConfigurableManager):
# dummy node objects for tracking position of nodes on other servers
self.phys = {}
self.physnets = {}
self.session.broker.handlers += (self.physnodehandlelink, )
self.session.broker.handlers.add(self.physnodehandlelink)
self.register()
def startup(self, nodenums=None):

View file

@ -50,7 +50,7 @@ class Sdt(object):
# node information for remote nodes not in session._objs
# local nodes also appear here since their obj may not exist yet
self.remotes = {}
session.broker.handlers += (self.handledistributed, )
session.broker.handlers.add(self.handledistributed)
def is_enabled(self):
''' Check for 'enablesdt' session option. Return False by default if

View file

@ -1132,7 +1132,7 @@ class SessionConfig(ConfigurableManager, Configurable):
def __init__(self, session):
ConfigurableManager.__init__(self, session)
session.broker.handlers += (self.handledistributed, )
session.broker.handlers.add(self.handledistributed)
self.reset()
def reset(self):