Mercurial > prosody-modules
changeset 2673:2e1a4740adee
mod_storage_memory: Include missing return statement (thanks jonasw)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 06 Apr 2017 10:14:00 +0200 (2017-04-06) |
parents | 75ab061069aa |
children | c971b2cee2cc |
files | mod_storage_memory/mod_storage_memory.lua |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_storage_memory/mod_storage_memory.lua Thu Apr 06 02:35:06 2017 +0200 +++ b/mod_storage_memory/mod_storage_memory.lua Thu Apr 06 10:14:00 2017 +0200 @@ -29,7 +29,7 @@ end function keyval_store:set(username, data) - self.store[username or NULL] = envload(serialize(data), "@data", {}); + self.store[username or NULL] = envload("return "..serialize(data), "@data", {}); return true; end @@ -45,10 +45,10 @@ if is_stanza(value) then value = st.preserialize(value); value = function () - return st.deserialize(envload(serialize(value), "@stanza", {})); + return st.deserialize(envload("return "..serialize(value), "@stanza", {})); end else - value = envload(serialize(value), "@data", {}); + value = envload("return "..serialize(value), "@data", {}); end local a = self.store[username or NULL]; if not a then