Software /
code /
prosody
Diff
util/xmppstream.lua @ 4305:e3ffa91517cc
util.xmppstream: Check to make sure parser.stop is present before calling it.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sun, 05 Jun 2011 01:57:43 +0500 |
parent | 4289:1e68721c02f2 |
child | 4306:a101c59772e7 |
line wrap: on
line diff
--- a/util/xmppstream.lua Sun Jun 05 01:52:48 2011 +0500 +++ b/util/xmppstream.lua Sun Jun 05 01:57:43 2011 +0500 @@ -162,7 +162,7 @@ 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