# HG changeset patch # User matthew@silver # Date 1252188066 -3600 # Node ID d55ee6c66910b0b354bc3ba60300dd6bad9f14f3 # Parent 2876a0ecceab106d623f513300b8e6970fc63462# Parent f1282fad2f991478c12d2c4778a4f031ba7d7000 Merge with 0.5 diff -r 2876a0ecceab -r d55ee6c66910 core/modulemanager.lua --- 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"; diff -r 2876a0ecceab -r d55ee6c66910 plugins/mod_presence.lua --- 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 diff -r 2876a0ecceab -r d55ee6c66910 util/datamanager.lua --- 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