diff options
author | Waqas Hussain <waqas20@gmail.com> | 2010-12-12 06:15:08 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2010-12-12 06:15:08 +0500 |
commit | c3e87cc5f3a4893510bd5b42bcd4856dae44227d (patch) | |
tree | d3defb0cea81a30f5d21be553a9a72bd92f0b297 /core/storagemanager.lua | |
parent | d6ce1c7e2a0e857ef575e999b4db2fb911650f5d (diff) | |
download | prosody-c3e87cc5f3a4893510bd5b42bcd4856dae44227d.tar.gz prosody-c3e87cc5f3a4893510bd5b42bcd4856dae44227d.zip |
storagemanager: When we have a cached data driver, we are supposed to use it.
Diffstat (limited to 'core/storagemanager.lua')
-rw-r--r-- | core/storagemanager.lua | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/core/storagemanager.lua b/core/storagemanager.lua index db540042..e0c12190 100644 --- a/core/storagemanager.lua +++ b/core/storagemanager.lua @@ -44,13 +44,12 @@ local function load_driver(host, driver_name) return; end local driver = stores_available:get(host, driver_name); - if not driver then - if driver_name ~= "internal" then - modulemanager.load(host, "storage_"..driver_name); - return stores_available:get(host, driver_name); - else - return setmetatable({host = host}, default_driver_mt); - end + if driver then return driver; end + if driver_name ~= "internal" then + modulemanager.load(host, "storage_"..driver_name); + return stores_available:get(host, driver_name); + else + return setmetatable({host = host}, default_driver_mt); end end |