net/connhandlers.lua

Thu, 23 Oct 2008 02:49:43 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Thu, 23 Oct 2008 02:49:43 +0500
changeset 117
8e5c5e6a3240
parent 38
3fdfd6e0cb4e
permissions
-rw-r--r--

Fixed: datamanager.store and datamanager.load could crash when username or host arguments were nil. (useful for server specific and global data).


local lxp = require "lxp"
local init_xmlhandlers = require "core.xmlhandlers"

module "connhandlers"


function new(name, session)
	if name == "xmpp-client" then
		local parser = lxp.new(init_xmlhandlers(session), ":");
		local parse = parser.parse;
		return { data = function (self, data) return parse(parser, data); end, parser = parser }
	end
end

return _M;

mercurial