aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/mod_bosh.lua4
-rw-r--r--plugins/mod_http.lua2
-rw-r--r--util/pubsub.lua1
3 files changed, 4 insertions, 3 deletions
diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua
index 350d6b0c..1270a080 100644
--- a/plugins/mod_bosh.lua
+++ b/plugins/mod_bosh.lua
@@ -70,8 +70,8 @@ end
local t_insert, t_remove, t_concat = table.insert, table.remove, table.concat;
local os_time = os.time;
-local sessions = {};
-local inactive_sessions = {}; -- Sessions which have no open requests
+-- All sessions, and sessions that have no requests open
+local sessions, inactive_sessions = module:shared("sessions", "inactive_sessions");
-- Used to respond to idle sessions (those with waiting requests)
local waiting_requests = {};
diff --git a/plugins/mod_http.lua b/plugins/mod_http.lua
index 22441faa..a7b4a45f 100644
--- a/plugins/mod_http.lua
+++ b/plugins/mod_http.lua
@@ -67,7 +67,7 @@ function moduleapi.http_url(module, app_name, default_path)
end
function module.add_host(module)
- local host = module.host;
+ local host = module:get_option_string("http_host", module.host);
local apps = {};
module.environment.apps = apps;
local function http_app_added(event)
diff --git a/util/pubsub.lua b/util/pubsub.lua
index d8ae1f38..8ff458e7 100644
--- a/util/pubsub.lua
+++ b/util/pubsub.lua
@@ -244,6 +244,7 @@ function service:publish(node, actor, id, item)
node_obj = self.nodes[node];
end
node_obj.data[id] = item;
+ self.events.fire_event("item-published", { node = node, actor = actor, id = id, item = item });
self.config.broadcaster(node, node_obj.subscribers, item);
return true;
end