From d80095a3d3490880b2263e7f15dc78de3e19373f Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Wed, 22 Apr 2009 21:42:19 +0100 Subject: mod_posix: Remove some debug coooooooooode --- plugins/mod_posix.lua | 1 - 1 file changed, 1 deletion(-) (limited to 'plugins') diff --git a/plugins/mod_posix.lua b/plugins/mod_posix.lua index f8fda7cd..36ca9a8c 100644 --- a/plugins/mod_posix.lua +++ b/plugins/mod_posix.lua @@ -43,7 +43,6 @@ end local syslog_opened function syslog_sink_maker(config) if not syslog_opened then - print("OPENING SYSLOOOOOOOOOG"); pposix.syslog_open("prosody"); syslog_opened = true; end -- cgit v1.2.3 From 850e8c18b0f06229c8f245c2a39856857815d964 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 23 Apr 2009 03:25:11 +0100 Subject: mod_bosh: Fix nil indexing when client connects to unknown host --- plugins/mod_bosh.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua index 58c2b5aa..0b39d903 100644 --- a/plugins/mod_bosh.lua +++ b/plugins/mod_bosh.lua @@ -102,7 +102,7 @@ end local function bosh_reset_stream(session) session.notopen = true; end -local session_close_reply = { headers = default_headers, body = st.stanza("body", { xmlns = xmlns_bosh, type = "terminate" }) }; +local session_close_reply = { headers = default_headers, body = st.stanza("body", { xmlns = xmlns_bosh, type = "terminate" }), attr = {} }; local function bosh_close_stream(session, reason) (session.log or log)("info", "BOSH client disconnected"); session_close_reply.attr.condition = reason; -- cgit v1.2.3 From 7b9daba98a2dde533c0418c7770e059268244d87 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 23 Apr 2009 03:25:48 +0100 Subject: mod_bosh: Add log message for clients connecting to unknown host --- plugins/mod_bosh.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins') diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua index 0b39d903..b3e953cc 100644 --- a/plugins/mod_bosh.lua +++ b/plugins/mod_bosh.lua @@ -125,6 +125,7 @@ function stream_callbacks.streamopened(request, attr) -- TODO: Sanity checks here (rid, to, known host, etc.) if not hosts[attr.to] then -- Unknown host + log("debug", "BOSH client tried to connect to unknown host: %s", tostring(attr.to)); session_close_reply.attr.condition = "host-unknown"; request:send{ headers = default_headers, body = tostring(session_close_reply) }; request.notopen = nil -- cgit v1.2.3 From 28ae0dd2a96bd440bc3b5d2a1b93cb908d3fea89 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 23 Apr 2009 03:27:22 +0100 Subject: mod_bosh: Put dummy authid in session creation response to keep JSJaC happy --- plugins/mod_bosh.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua index b3e953cc..d15f363d 100644 --- a/plugins/mod_bosh.lua +++ b/plugins/mod_bosh.lua @@ -180,7 +180,7 @@ function stream_callbacks.streamopened(request, attr) --xmpp:version='1.0' xmlns:xmpp='urn:xmpp:xbosh' local response = st.stanza("body", { xmlns = xmlns_bosh, inactivity = tostring(BOSH_DEFAULT_INACTIVITY), polling = tostring(BOSH_DEFAULT_POLLING), requests = tostring(BOSH_DEFAULT_REQUESTS), hold = tostring(session.bosh_hold), maxpause = "120", - sid = sid, ver = '1.6', from = session.host, secure = 'true', ["xmpp:version"] = "1.0", + sid = sid, authid = sid, ver = '1.6', from = session.host, secure = 'true', ["xmpp:version"] = "1.0", ["xmlns:xmpp"] = "urn:xmpp:xbosh", ["xmlns:stream"] = "http://etherx.jabber.org/streams" }):add_child(features); request:send{ headers = default_headers, body = tostring(response) }; -- cgit v1.2.3