Software /
code /
prosody
Diff
core/storagemanager.lua @ 3734:ec59071e2a55
storagemanager: When we have a cached data driver, we are supposed to use it.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sun, 12 Dec 2010 06:15:08 +0500 |
parent | 3728:b1b8fe846d68 |
child | 3770:4de73ae45163 |
line wrap: on
line diff
--- a/core/storagemanager.lua Sun Dec 12 02:03:32 2010 +0100 +++ b/core/storagemanager.lua Sun Dec 12 06:15:08 2010 +0500 @@ -44,13 +44,12 @@ 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