summaryrefslogtreecommitdiffstats
path: root/lib/module.c
diff options
context:
space:
mode:
authorMarek Vavruša <marek.vavrusa@nic.cz>2015-05-26 09:37:22 +0200
committerMarek Vavruša <marek.vavrusa@nic.cz>2015-05-27 00:11:12 +0200
commit587450c7fd712e03c2c5f8550576469be1975a50 (patch)
treec97e75837e114d450441b2e1d87d9308681bcd75 /lib/module.c
parentdaemon/engine: compat for Lua < 5.2 (diff)
downloadknot-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.c4
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);