aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2011-06-05 01:57:43 +0500
committerWaqas Hussain <waqas20@gmail.com>2011-06-05 01:57:43 +0500
commit57683f24cf25eb604c3a585c1fe46bd3065a31e7 (patch)
tree1034268cda45758720e3cdd9dfcde895f7bdebce
parent90aba51b65afbbcbcd261b4b6bf0fe4f98b44df2 (diff)
downloadprosody-57683f24cf25eb604c3a585c1fe46bd3065a31e7.tar.gz
prosody-57683f24cf25eb604c3a585c1fe46bd3065a31e7.zip
util.xmppstream: Check to make sure parser.stop is present before calling it.
-rw-r--r--util/xmppstream.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/xmppstream.lua b/util/xmppstream.lua
index 69e7690d..ac4d77af 100644
--- a/util/xmppstream.lua
+++ b/util/xmppstream.lua
@@ -162,7 +162,7 @@ function new_sax_handlers(session, stream_callbacks)
local function restricted_handler(parser)
cb_error(session, "parse-error", "restricted-xml", "Restricted XML, see RFC 6120 section 11.1.");
- if not parser:stop() then
+ if not parser.stop or not parser:stop() then
error("Failed to abort parsing");
end
end