diff options
author | Marek Vavruša <marek.vavrusa@nic.cz> | 2015-05-26 09:37:22 +0200 |
---|---|---|
committer | Marek Vavruša <marek.vavrusa@nic.cz> | 2015-05-27 00:11:12 +0200 |
commit | 587450c7fd712e03c2c5f8550576469be1975a50 (patch) | |
tree | c97e75837e114d450441b2e1d87d9308681bcd75 /lib/module.c | |
parent | daemon/engine: compat for Lua < 5.2 (diff) | |
download | knot-resolver-587450c7fd712e03c2c5f8550576469be1975a50.tar.xz knot-resolver-587450c7fd712e03c2c5f8550576469be1975a50.zip |
modules/kmemcached: memcached backend for resolver cache
memcached is a distributed caching system, it is a good fit
for building resolvers with shared and replicated cache
Diffstat (limited to 'lib/module.c')
-rw-r--r-- | lib/module.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/module.c b/lib/module.c index 19c93bc9..9464a46b 100644 --- a/lib/module.c +++ b/lib/module.c @@ -150,8 +150,10 @@ int kr_module_load(struct kr_module *module, const char *name, const char *path) return kr_error(EINVAL); } - /* Initialize. */ + /* Initialize, keep userdata */ + void *data = module->data; memset(module, 0, sizeof(struct kr_module)); + module->data = data; module->name = strdup(name); if (module->name == NULL) { return kr_error(ENOMEM); |