Automated merge with http://prosody.im/source/hg

Sun, 06 Sep 2009 22:08:05 +0200

author
Tobias Markmann <tm@ayena.de>
date
Sun, 06 Sep 2009 22:08:05 +0200
changeset 1759
4a280effc975
parent 1733
d55ee6c66910 (diff)
parent 1758
5acbf4318715 (current diff)
child 1760
0372bf35dcb3

Automated merge with http://prosody.im/source/hg

--- a/core/modulemanager.lua	Sun Sep 06 22:07:59 2009 +0200
+++ b/core/modulemanager.lua	Sun Sep 06 22:08:05 2009 +0200
@@ -228,7 +228,7 @@
 end
 
 function handle_stanza(host, origin, stanza)
-	local name, xmlns, origin_type = stanza.name, stanza.attr.xmlns, origin.type;
+	local name, xmlns, origin_type = stanza.name, stanza.attr.xmlns or "jabber:client", origin.type;
 	if name == "iq" and xmlns == "jabber:client" then
 		if stanza.attr.type == "get" or stanza.attr.type == "set" then
 			xmlns = stanza.tags[1].attr.xmlns or "jabber:client";
--- a/net/dns.lua	Sun Sep 06 22:07:59 2009 +0200
+++ b/net/dns.lua	Sun Sep 06 22:08:05 2009 +0200
@@ -17,6 +17,7 @@
 require 'socket'
 local ztact = require 'util.ztact'
 local require = require
+local os = os;
 
 local coroutine, io, math, socket, string, table =
       coroutine, io, math, socket, string, table
--- a/plugins/mod_compression.lua	Sun Sep 06 22:07:59 2009 +0200
+++ b/plugins/mod_compression.lua	Sun Sep 06 22:08:05 2009 +0200
@@ -35,7 +35,7 @@
 );
 
 -- TODO Support compression on S2S level too.
-module:add_handler({"c2s_unauthed", "c2s_authed"}, "compress", xmlns_compression_protocol,
+module:add_handler({"c2s_unauthed", "c2s"}, "compress", xmlns_compression_protocol,
 		function(session, stanza)
 			-- fail if we are already compressed
 			if session.compressed then
--- a/plugins/mod_presence.lua	Sun Sep 06 22:07:59 2009 +0200
+++ b/plugins/mod_presence.lua	Sun Sep 06 22:08:05 2009 +0200
@@ -29,7 +29,7 @@
 	if stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable" and stanza.attr.type ~= "error" then
 		local node, host = jid_split(stanza.attr.to);
 		host = hosts[host];
-		if host and host.type == "local" then
+		if node and host and host.type == "local" then
 			handle_inbound_presence_subscriptions_and_probes(origin, stanza, jid_bare(stanza.attr.from), jid_bare(stanza.attr.to), core_route_stanza);
 			return;
 		end
--- a/util/datamanager.lua	Sun Sep 06 22:07:59 2009 +0200
+++ b/util/datamanager.lua	Sun Sep 06 22:08:05 2009 +0200
@@ -137,7 +137,7 @@
 	append(f, data);
 	f:close();
 	if next(data) == nil then -- try to delete empty datastore
-		log("debug", "Removing empty %s datastore for user %s@%s", datastore, username, host);
+		log("debug", "Removing empty %s datastore for user %s@%s", datastore, username or "nil", host or "nil");
 		os_remove(getpath(username, host, datastore));
 	end
 	-- we write data even when we are deleting because lua doesn't have a
@@ -179,7 +179,7 @@
 	end
 	f:close();
 	if next(data) == nil then -- try to delete empty datastore
-		log("debug", "Removing empty %s datastore for user %s@%s", datastore, username, host);
+		log("debug", "Removing empty %s datastore for user %s@%s", datastore, username or "nil", host or "nil");
 		os_remove(getpath(username, host, datastore, "list"));
 	end
 	-- we write data even when we are deleting because lua doesn't have a

mercurial