modulemanager: Fixed: Internally generated stanzas could be missing namespaces, which causes tracebacks in logging (e.g., auto-generated offline presence)

Sun, 06 Sep 2009 01:31:18 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Sun, 06 Sep 2009 01:31:18 +0500
changeset 1730
f4170bc82969
parent 1726
85518cb866dd
child 1731
38d87682cb4a

modulemanager: Fixed: Internally generated stanzas could be missing namespaces, which causes tracebacks in logging (e.g., auto-generated offline presence)

core/modulemanager.lua file | annotate | diff | comparison | revisions
--- a/core/modulemanager.lua	Thu Aug 20 16:30:03 2009 +0100
+++ b/core/modulemanager.lua	Sun Sep 06 01:31:18 2009 +0500
@@ -235,7 +235,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";

mercurial