Software /
code /
prosody
Comparison
core/storagemanager.lua @ 7643:44fe2aaf817e
storagemanager: Simplify function flow
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 31 Aug 2016 11:45:06 +0100 |
parent | 7325:7baf1b14defb |
child | 7644:90a4790c2329 |
comparison
equal
deleted
inserted
replaced
7642:2dcb402c4a0d | 7643:44fe2aaf817e |
---|---|
151 local ret, err = driver:open(store, typ); | 151 local ret, err = driver:open(store, typ); |
152 if not ret then | 152 if not ret then |
153 if err == "unsupported-store" then | 153 if err == "unsupported-store" then |
154 if typ == "map" then -- Use shim on top of keyval store | 154 if typ == "map" then -- Use shim on top of keyval store |
155 log("debug", "map storage driver unavailable, using shim on top of keyval store."); | 155 log("debug", "map storage driver unavailable, using shim on top of keyval store."); |
156 return create_map_shim(host, store); | 156 ret, err = create_map_shim(host, store); |
157 end | 157 else |
158 log("debug", "Storage driver %s does not support store %s (%s), falling back to null driver", | 158 log("debug", "Storage driver %s does not support store %s (%s), falling back to null driver", |
159 driver_name, store, typ or "<nil>"); | 159 driver_name, store, typ or "<nil>"); |
160 ret = null_storage_driver; | 160 ret, err = null_storage_driver, nil; |
161 err = nil; | 161 end |
162 end | 162 end |
163 end | 163 end |
164 return ret, err; | 164 return ret, err; |
165 end | 165 end |
166 | 166 |