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 | 6771ad9d2998f4589ebacb819b89f133fb8c7970 (patch) | |
tree | 55d366e206953b5de26d1a915a823c6846b6452f /core/storagemanager.lua | |
parent | 49298b499e5018526c6b95b3d81585bfe5cb710f (diff) | |
download | prosody-6771ad9d2998f4589ebacb819b89f133fb8c7970.tar.gz prosody-6771ad9d2998f4589ebacb819b89f133fb8c7970.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 |