Comparison

core/storagemanager.lua @ 4115:801725a32c96

storagemanager: Export load_driver() function so it can be used from e.g. migrators
author Matthew Wild <mwild1@gmail.com>
date Tue, 11 Jan 2011 06:18:24 +0000
parent 4085:7699cef04740
child 4758:b8b050e76ee1
comparison
equal deleted inserted replaced
4113:65482a852c4d 4115:801725a32c96
43 stores_available:set(host, item.name, nil); 43 stores_available:set(host, item.name, nil);
44 end); 44 end);
45 end 45 end
46 prosody.events.add_handler("host-activated", initialize_host, 101); 46 prosody.events.add_handler("host-activated", initialize_host, 101);
47 47
48 local function load_driver(host, driver_name) 48 function load_driver(host, driver_name)
49 if driver_name == "null" then 49 if driver_name == "null" then
50 return null_storage_provider; 50 return null_storage_provider;
51 end 51 end
52 local driver = stores_available:get(host, driver_name); 52 local driver = stores_available:get(host, driver_name);
53 if driver then return driver; end 53 if driver then return driver; end