Merge 0.7->trunk

Sat, 03 Apr 2010 23:09:59 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Sat, 03 Apr 2010 23:09:59 +0100
changeset 2962
0caed31a7306
parent 2954
24483a7bf420 (current diff)
parent 2961
db3c0ecce3f4 (diff)
child 2963
abd1a30330e0

Merge 0.7->trunk

--- a/plugins/mod_bosh.lua	Tue Mar 30 19:48:04 2010 +0100
+++ b/plugins/mod_bosh.lua	Sat Apr 03 23:09:59 2010 +0100
@@ -23,7 +23,7 @@
 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 @@
 	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);
--- a/util/uuid.lua	Tue Mar 30 19:48:04 2010 +0100
+++ b/util/uuid.lua	Sat Apr 03 23:09:59 2010 +0100
@@ -32,7 +32,7 @@
 	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;
--- a/util/ztact.lua	Tue Mar 30 19:48:04 2010 +0100
+++ b/util/ztact.lua	Sat Apr 03 23:09:59 2010 +0100
@@ -114,7 +114,7 @@
 
 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 @@
 
 
 local function test_queue ()
-  t = {}
+  local t = {}
   enqueue (t, 1)
   enqueue (t, 2)
   enqueue (t, 3)

mercurial