diff options
author | Waqas Hussain <waqas20@gmail.com> | 2008-11-23 10:39:13 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2008-11-23 10:39:13 +0500 |
commit | f1878f266675ad6f8003c3d514769f8d5984bc3a (patch) | |
tree | 4fdbc1e5ed4153d4818c8ec36596af400e82e749 | |
parent | fe379b9bdb0b4a52eeef2824e89164bc0e32fd44 (diff) | |
download | prosody-f1878f266675ad6f8003c3d514769f8d5984bc3a.tar.gz prosody-f1878f266675ad6f8003c3d514769f8d5984bc3a.zip |
Check to prevent error on IQs from completely unhandled origins
-rw-r--r-- | core/modulemanager.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/modulemanager.lua b/core/modulemanager.lua index b0fb6cd9..d313130c 100644 --- a/core/modulemanager.lua +++ b/core/modulemanager.lua @@ -92,8 +92,8 @@ function handle_stanza(origin, stanza) if child then local xmlns = child.attr.xmlns or xmlns; log("debug", "Stanza of type %s from %s has xmlns: %s", name, origin_type, xmlns); - local handler = handlers[origin_type][name][xmlns]; - if handler then + local handler = handlers[origin_type][name] and handlers[origin_type][name][xmlns]; + if handler then log("debug", "Passing stanza to mod_%s", handler_info[handler].name); return handler(origin, stanza) or true; end |