Software /
code /
prosody
Comparison
core/modulemanager.lua @ 398:79f84fc3e9ae
Check to prevent error on IQs from completely unhandled origins
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sun, 23 Nov 2008 10:39:13 +0500 |
parent | 391:79bd7a3e906c |
child | 400:068a813b6454 |
comparison
equal
deleted
inserted
replaced
394:2a81158b1fc7 | 398:79f84fc3e9ae |
---|---|
90 log("debug", "Stanza is an <iq/>"); | 90 log("debug", "Stanza is an <iq/>"); |
91 local child = stanza.tags[1]; | 91 local child = stanza.tags[1]; |
92 if child then | 92 if child then |
93 local xmlns = child.attr.xmlns or xmlns; | 93 local xmlns = child.attr.xmlns or xmlns; |
94 log("debug", "Stanza of type %s from %s has xmlns: %s", name, origin_type, xmlns); | 94 log("debug", "Stanza of type %s from %s has xmlns: %s", name, origin_type, xmlns); |
95 local handler = handlers[origin_type][name][xmlns]; | 95 local handler = handlers[origin_type][name] and handlers[origin_type][name][xmlns]; |
96 if handler then | 96 if handler then |
97 log("debug", "Passing stanza to mod_%s", handler_info[handler].name); | 97 log("debug", "Passing stanza to mod_%s", handler_info[handler].name); |
98 return handler(origin, stanza) or true; | 98 return handler(origin, stanza) or true; |
99 end | 99 end |
100 end | 100 end |
101 elseif handlers[origin_type] then | 101 elseif handlers[origin_type] then |