aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_bosh.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-05-04 19:57:05 +0100
committerMatthew Wild <mwild1@gmail.com>2009-05-04 19:57:05 +0100
commit2fff09895975e5b2fb3d0aee38c2f652c6029e15 (patch)
treef0e16c01357473480d90a6d4726094fbb3aa30ec /plugins/mod_bosh.lua
parent9817a326507ae8127365578adfac7a9074fe48c1 (diff)
parentef5e994b1f4303d7940194fc980f5b5e94654c76 (diff)
downloadprosody-2fff09895975e5b2fb3d0aee38c2f652c6029e15.tar.gz
prosody-2fff09895975e5b2fb3d0aee38c2f652c6029e15.zip
Merge with 0.4
Diffstat (limited to 'plugins/mod_bosh.lua')
-rw-r--r--plugins/mod_bosh.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua
index 653af8bb..46e9a95f 100644
--- a/plugins/mod_bosh.lua
+++ b/plugins/mod_bosh.lua
@@ -12,7 +12,8 @@ local new_uuid = require "util.uuid".generate;
local fire_event = require "core.eventmanager".fire_event;
local core_process_stanza = core_process_stanza;
local st = require "util.stanza";
-local log = require "util.logger".init("bosh");
+local logger = require "util.logger";
+local log = logger.init("mod_bosh");
local stream_callbacks = { stream_tag = "http://jabber.org/protocol/httpbind|body" };
local config = require "core.configmanager";
local xmlns_bosh = "http://jabber.org/protocol/httpbind"; -- (hard-coded into a literal in session.send)
@@ -137,8 +138,10 @@ function stream_callbacks.streamopened(request, attr)
sid = new_uuid();
local session = { type = "c2s_unauthed", conn = {}, sid = sid, rid = attr.rid, host = attr.to, bosh_version = attr.ver, bosh_wait = attr.wait, streamid = sid,
bosh_hold = BOSH_DEFAULT_HOLD, bosh_max_inactive = BOSH_DEFAULT_INACTIVITY,
- requests = { }, send_buffer = {}, reset_stream = bosh_reset_stream, close = bosh_close_stream, dispatch_stanza = core_process_stanza };
+ requests = { }, send_buffer = {}, reset_stream = bosh_reset_stream, close = bosh_close_stream,
+ dispatch_stanza = core_process_stanza, log = logger.init("bosh"..sid) };
sessions[sid] = session;
+
log("info", "New BOSH session, assigned it sid '%s'", sid);
local r, send_buffer = session.requests, session.send_buffer;
local response = { headers = default_headers }