Software /
code /
prosody-modules
Diff
mod_storage_gdbm/mod_storage_gdbm.lua @ 1631:98427ed3d53f
mod_storage_gdbm: Update archive metadata only if data write succeeds
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 25 Mar 2015 17:41:13 +0100 |
parent | 1630:0fcd63818aa1 |
child | 1632:050d101af207 |
line wrap: on
line diff
--- a/mod_storage_gdbm/mod_storage_gdbm.lua Wed Mar 25 17:39:29 2015 +0100 +++ b/mod_storage_gdbm/mod_storage_gdbm.lua Wed Mar 25 17:41:13 2015 +0100 @@ -78,9 +78,9 @@ end meta[i] = { key = key, when = when, with = with, type = type }; meta[key] = i; - local ok, err = self:set(username, meta); + local ok, err = self:set(key, value); if not ok then return nil, err; end - ok, err = self:set(key, value); + ok, err = self:set(username, meta); if not ok then return nil, err; end return key; end