From fefd7ac17a34133e53fb0b0f300331aa4d4e41b4 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Tue, 5 May 2009 18:07:13 +0100 Subject: util.serialization: Write nil for non-serializable data types, and bump the log level to 'error' --- util/serialization.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'util') diff --git a/util/serialization.lua b/util/serialization.lua index 41d963e9..4da811ae 100644 --- a/util/serialization.lua +++ b/util/serialization.lua @@ -52,7 +52,8 @@ local function _simplesave(o, ind, t, func) elseif type(o) == "boolean" then func(t, (o and "true" or "false")); else - log("warn", "cannot serialize a %s: %s", type(o), debug_traceback()) + log("error", "cannot serialize a %s: %s", type(o), debug_traceback()) + func(t, "nil,\n"); end end -- cgit v1.2.3 From 95040378fd0373e8e17cddff42b7017d120b78c2 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Wed, 6 May 2009 21:45:02 +0100 Subject: util.prosodyctl: Import CFG_SOURCEDIR from the global environment (thanks macaronyde!) --- util/prosodyctl.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'util') diff --git a/util/prosodyctl.lua b/util/prosodyctl.lua index 3b523a78..ce223459 100644 --- a/util/prosodyctl.lua +++ b/util/prosodyctl.lua @@ -9,6 +9,9 @@ local nodeprep, nameprep = stringprep.nodeprep, stringprep.nameprep; local io, os = io, os; local tostring, tonumber = tostring, tonumber; + +local CFG_SOURCEDIR = _G.CFG_SOURCEDIR; + module "prosodyctl" function adduser(params) -- cgit v1.2.3