Comparison

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
comparison
equal deleted inserted replaced
4304:73bf8aab8b77 4305:e3ffa91517cc
160 end 160 end
161 end 161 end
162 162
163 local function restricted_handler(parser) 163 local function restricted_handler(parser)
164 cb_error(session, "parse-error", "restricted-xml", "Restricted XML, see RFC 6120 section 11.1."); 164 cb_error(session, "parse-error", "restricted-xml", "Restricted XML, see RFC 6120 section 11.1.");
165 if not parser:stop() then 165 if not parser.stop or not parser:stop() then
166 error("Failed to abort parsing"); 166 error("Failed to abort parsing");
167 end 167 end
168 end 168 end
169 169
170 if lxp_supports_doctype then 170 if lxp_supports_doctype then