Software /
code /
prosody
Changeset
7643:44fe2aaf817e
storagemanager: Simplify function flow
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 31 Aug 2016 11:45:06 +0100 |
parents | 7642:2dcb402c4a0d |
children | 7644:90a4790c2329 |
files | core/storagemanager.lua |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/core/storagemanager.lua Wed Aug 31 11:42:03 2016 +0100 +++ b/core/storagemanager.lua Wed Aug 31 11:45:06 2016 +0100 @@ -153,12 +153,12 @@ if err == "unsupported-store" then if typ == "map" then -- Use shim on top of keyval store log("debug", "map storage driver unavailable, using shim on top of keyval store."); - return create_map_shim(host, store); + ret, err = create_map_shim(host, store); + else + log("debug", "Storage driver %s does not support store %s (%s), falling back to null driver", + driver_name, store, typ or "<nil>"); + ret, err = null_storage_driver, nil; end - log("debug", "Storage driver %s does not support store %s (%s), falling back to null driver", - driver_name, store, typ or "<nil>"); - ret = null_storage_driver; - err = nil; end end return ret, err;