Software /
code /
prosody
Changeset
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 |
parents | 3733:26571a99f6e6 |
children | 3735:40b54c46a14c |
files | core/storagemanager.lua |
diffstat | 1 files changed, 6 insertions(+), 7 deletions(-) [+] |
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