# HG changeset patch # User Kim Alvefur # Date 1442585683 -7200 # Node ID 5ce783c3702418d6bfe588904187f3546ae449dd # Parent 20b0f0b4865553efae44178577c3219056f33ea7 xep227toprosody: Pass parser to callbacks (needed since addition of stanza size limits) diff -r 20b0f0b48655 -r 5ce783c37024 tools/xep227toprosody.lua --- a/tools/xep227toprosody.lua Fri Sep 25 16:48:25 2015 +0100 +++ b/tools/xep227toprosody.lua Fri Sep 18 16:14:43 2015 +0200 @@ -202,7 +202,7 @@ --count = count + 1; if curr_host ~= "" then -- forward to xmlhandlers - user_handlers:StartElement(elementname, attributes); + user_handlers.StartElement(parser, elementname, attributes); elseif (curr_ns == xmlns_xep227) and (name == "host") then curr_host = attributes["jid"]; -- start of host element print("Begin parsing host "..curr_host); @@ -226,7 +226,7 @@ curr_host = "" -- end of host element else -- forward to xmlhandlers - user_handlers:EndElement(elementname); + user_handlers.EndElement(parser, elementname); end elseif (curr_ns ~= xmlns_xep227) or (name ~= "server-data") then io.stderr:write("Unhandled XML element: ", name, "\n"); @@ -237,7 +237,7 @@ function lxp_handlers.CharacterData(parser, string) if curr_host ~= "" then -- forward to xmlhandlers - user_handlers:CharacterData(string); + user_handlers.CharacterData(parser, string); end end