Software /
code /
prosody
Changeset
6282:bce801e40484
mod_storage_sql2: Don't ignore failure in keyval_store:get() (thanks daurnimator)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 20 Jun 2014 16:16:33 +0200 |
parents | 6281:8dc01fa767e0 |
children | 6283:7cf6d3a2c855 |
files | plugins/mod_storage_sql2.lua |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_storage_sql2.lua Fri Jun 20 16:10:04 2014 +0200 +++ b/plugins/mod_storage_sql2.lua Fri Jun 20 16:16:33 2014 +0200 @@ -198,7 +198,9 @@ 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;