diff --git a/wfb_ng/protocols.py b/wfb_ng/protocols.py index 4c45db7d..4af5f89d 100644 --- a/wfb_ng/protocols.py +++ b/wfb_ng/protocols.py @@ -77,6 +77,7 @@ def connectionMade(self): msg = json.dumps(dict(type='settings', profile=self.factory.profile, is_cluster=self.factory.is_cluster, + wlans=self.factory.wlans, settings = deepcopy(settings))) self.sendLine(msg.encode('utf-8')) @@ -164,10 +165,11 @@ class JSONAPIFactory(Factory): noisy = False protocol = StatisticsJSONProtocol - def __init__(self, ui_sessions, is_cluster=False, profile=None): + def __init__(self, ui_sessions, is_cluster=False, profile=None, wlans=None): self.ui_sessions = ui_sessions self.is_cluster = is_cluster self.profile = profile + self.wlans = wlans class AntStatsAndSelector(object): diff --git a/wfb_ng/server.py b/wfb_ng/server.py index ca35de49..7adc55ab 100644 --- a/wfb_ng/server.py +++ b/wfb_ng/server.py @@ -226,7 +226,7 @@ def _cleanup(x): sockets.append(reactor.listenTCP(profile_cfg.stats_port, p_f)) if profile_cfg.api_port: - p_f = JSONAPIFactory(ant_sel_f.ui_sessions, is_cluster, profile) + p_f = JSONAPIFactory(ant_sel_f.ui_sessions, is_cluster, profile, wlans) sockets.append(reactor.listenTCP(profile_cfg.api_port, p_f)) for service_name, service_type, srv_cfg in service_list: