Merge with 0.5

Sat, 05 Sep 2009 23:01:06 +0100

author
matthew@silver
date
Sat, 05 Sep 2009 23:01:06 +0100
changeset 1733
d55ee6c66910
parent 1729
2876a0ecceab (current diff)
parent 1732
f1282fad2f99 (diff)
child 1734
34ac9ba0aad6
child 1759
4a280effc975

Merge with 0.5

core/modulemanager.lua file | annotate | diff | comparison | revisions
--- a/core/modulemanager.lua	Wed Sep 02 19:23:02 2009 +0500
+++ b/core/modulemanager.lua	Sat Sep 05 23:01:06 2009 +0100
@@ -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/plugins/mod_presence.lua	Wed Sep 02 19:23:02 2009 +0500
+++ b/plugins/mod_presence.lua	Sat Sep 05 23:01:06 2009 +0100
@@ -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	Wed Sep 02 19:23:02 2009 +0500
+++ b/util/datamanager.lua	Sat Sep 05 23:01:06 2009 +0100
@@ -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