aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/mod_bosh.lua4
-rw-r--r--util/uuid.lua2
-rw-r--r--util/ztact.lua4
3 files changed, 5 insertions, 5 deletions
diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua
index 14cb1b91..02f3ce38 100644
--- a/plugins/mod_bosh.lua
+++ b/plugins/mod_bosh.lua
@@ -23,7 +23,7 @@ local logger = require "util.logger";
local log = logger.init("mod_bosh");
local xmlns_bosh = "http://jabber.org/protocol/httpbind"; -- (hard-coded into a literal in session.send)
-local stream_callbacks = { stream_ns = "http://jabber.org/protocol/httpbind", stream_tag = "body", default_ns = xmlns_bosh };
+local stream_callbacks = { stream_ns = "http://jabber.org/protocol/httpbind", stream_tag = "body", default_ns = "jabber:client" };
local BOSH_DEFAULT_HOLD = tonumber(module:get_option("bosh_default_hold")) or 1;
local BOSH_DEFAULT_INACTIVITY = tonumber(module:get_option("bosh_max_inactivity")) or 60;
@@ -274,7 +274,7 @@ function stream_callbacks.handlestanza(request, stanza)
local session = sessions[request.sid];
if session then
if stanza.attr.xmlns == xmlns_bosh then
- stanza.attr.xmlns = "jabber:client";
+ stanza.attr.xmlns = nil;
end
session.ip = request.handler:ip();
core_process_stanza(session, stanza);
diff --git a/util/uuid.lua b/util/uuid.lua
index d46f8665..796c8ee4 100644
--- a/util/uuid.lua
+++ b/util/uuid.lua
@@ -32,7 +32,7 @@ local function _seed(x)
buffer = new_random(buffer..x);
end
local function get_nibbles(n)
- if #buffer < n then seed(uniq_time()); end
+ if #buffer < n then _seed(uniq_time()); end
local r = buffer:sub(0, n);
buffer = buffer:sub(n+1);
return r;
diff --git a/util/ztact.lua b/util/ztact.lua
index 35902ba1..2507bf8e 100644
--- a/util/ztact.lua
+++ b/util/ztact.lua
@@ -114,7 +114,7 @@ function tohex (s) -- - - - - - - - - - - - - - - - - - - - - - - - - tohex
function tostring_r (d, indent, tab0) -- - - - - - - - - - - - - tostring_r
- tab1 = tab0 or {}
+ local tab1 = tab0 or {}
local rep = string.rep (' ', indent or 0)
if type (d) == 'table' then
for k,v in pairs (d) do
@@ -210,7 +210,7 @@ function enqueue (queue, element) -- - - - - - - - - - - - - - - - - enqueue
local function test_queue ()
- t = {}
+ local t = {}
enqueue (t, 1)
enqueue (t, 2)
enqueue (t, 3)