aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/ejabberd2prosody.lua6
-rw-r--r--tools/jabberd14sql2prosody.lua2
2 files changed, 5 insertions, 3 deletions
diff --git a/tools/ejabberd2prosody.lua b/tools/ejabberd2prosody.lua
index e9dbd2dc..66bf4f93 100755
--- a/tools/ejabberd2prosody.lua
+++ b/tools/ejabberd2prosody.lua
@@ -44,8 +44,10 @@ function build_stanza(tuple, stanza)
for _, a in ipairs(tuple[4]) do build_stanza(a, stanza); end
if up then stanza:up(); else return stanza end
elseif tuple[1] == "xmlcdata" then
- assert(type(tuple[2]) == "string", "XML CDATA has unexpected type: "..type(tuple[2]));
- stanza:text(tuple[2]);
+ if type(tuple[2]) ~= "table" then
+ assert(type(tuple[2]) == "string", "XML CDATA has unexpected type: "..type(tuple[2]));
+ stanza:text(tuple[2]);
+ end -- else it's [], i.e., the null value, used for the empty string
else
error("unknown element type: "..serialize(tuple));
end
diff --git a/tools/jabberd14sql2prosody.lua b/tools/jabberd14sql2prosody.lua
index 03376b30..e43dc296 100644
--- a/tools/jabberd14sql2prosody.lua
+++ b/tools/jabberd14sql2prosody.lua
@@ -428,7 +428,7 @@ end
end
-- import modules
-package.path = package.path.."..\?.lua;";
+package.path = package.path..";../?.lua;";
local my_name = arg[0];
if my_name:match("[/\\]") then