Software /
code /
prosody
Comparison
core/storagemanager.lua @ 3403:b89680015b7b
storagemanager: Fixed a nil access.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Mon, 26 Jul 2010 00:58:19 +0500 |
parent | 3401:2387f35db5c8 |
child | 3644:22fc2063b824 |
comparison
equal
deleted
inserted
replaced
3402:dfc369314e53 | 3403:b89680015b7b |
---|---|
18 module("storagemanager") | 18 module("storagemanager") |
19 | 19 |
20 local default_driver_mt = {}; | 20 local default_driver_mt = {}; |
21 default_driver_mt.__index = default_driver_mt; | 21 default_driver_mt.__index = default_driver_mt; |
22 function default_driver_mt:open(store) | 22 function default_driver_mt:open(store) |
23 return setmetatable({ host = self.host, store = self.store }, default_driver_mt); | 23 return setmetatable({ host = self.host, store = store }, default_driver_mt); |
24 end | 24 end |
25 function default_driver_mt:get(user) return olddm.load(user, self.host, self.store); end | 25 function default_driver_mt:get(user) return olddm.load(user, self.host, self.store); end |
26 function default_driver_mt:set(user, data) return olddm.store(user, self.host, self.store, data); end | 26 function default_driver_mt:set(user, data) return olddm.store(user, self.host, self.store, data); end |
27 | 27 |
28 local function load_driver_for_host(host) | 28 local function load_driver_for_host(host) |