Comparison

core/storagemanager.lua @ 3849:34981acbd5d5

storagemanager: Fixed a nil global access.
author Waqas Hussain <waqas20@gmail.com>
date Sun, 12 Dec 2010 05:13:02 +0500
parent 3790:23cd998c765b
child 3728:b1b8fe846d68
comparison
equal deleted inserted replaced
3848:3933e007f829 3849:34981acbd5d5
23 function default_driver_mt:set(user, data) return olddm.store(user, self.host, self.store, data); end 23 function default_driver_mt:set(user, data) return olddm.store(user, self.host, self.store, data); end
24 24
25 local stores_available = multitable.new(); 25 local stores_available = multitable.new();
26 26
27 function initialize_host(host) 27 function initialize_host(host)
28 local host_session = hosts[host];
28 host_session.events.add_handler("item-added/data-driver", function (event) 29 host_session.events.add_handler("item-added/data-driver", function (event)
29 local item = event.item; 30 local item = event.item;
30 stores_available:set(host, item.name, item); 31 stores_available:set(host, item.name, item);
31 end); 32 end);
32 33