projects
/
prosody.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mod_tls: Simplify and use new ssl config merging in certmanager
[prosody.git]
/
plugins
/
mod_storage_sql2.lua
diff --git
a/plugins/mod_storage_sql2.lua
b/plugins/mod_storage_sql2.lua
index 7414e5ed155ad256a24b4bb755062b189b9bc0ba..0531c90500cc79b54c381a19b05d672219b5bbae 100644
(file)
--- a/
plugins/mod_storage_sql2.lua
+++ b/
plugins/mod_storage_sql2.lua
@@
-2,7
+2,7
@@
local json = require "util.json";
local xml_parse = require "util.xml".parse;
local uuid = require "util.uuid";
local json = require "util.json";
local xml_parse = require "util.xml".parse;
local uuid = require "util.uuid";
-local resolve_relative_path = require "
core.configmanager
".resolve_relative_path;
+local resolve_relative_path = require "
util.paths
".resolve_relative_path;
local stanza_mt = require"util.stanza".stanza_mt;
local getmetatable = getmetatable;
local stanza_mt = require"util.stanza".stanza_mt;
local getmetatable = getmetatable;
@@
-198,7
+198,9
@@
local keyval_store = {};
keyval_store.__index = keyval_store;
function keyval_store:get(username)
user,store = username,self.store;
keyval_store.__index = keyval_store;
function keyval_store:get(username)
user,store = username,self.store;
- return select(2, engine:transaction(keyval_store_get));
+ local ok, result = engine:transaction(keyval_store_get);
+ if not ok then return ok, result; end
+ return result;
end
function keyval_store:set(username, data)
user,store = username,self.store;
end
function keyval_store:set(username, data)
user,store = username,self.store;