From: Marek VavruĊĦa Date: Sun, 3 May 2015 18:28:51 +0000 (+0200) Subject: lib/rrcache: renamed itercache to rrcache X-Git-Tag: v1.0.0-beta1~220^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=723477eac7d8fd53ba1bbaf9fdb7e3dd8f6896df;p=thirdparty%2Fknot-resolver.git lib/rrcache: renamed itercache to rrcache --- diff --git a/daemon/engine.c b/daemon/engine.c index 32ba8d375..a5eb274ee 100644 --- a/daemon/engine.c +++ b/daemon/engine.c @@ -118,7 +118,7 @@ static int init_resolver(struct engine *engine) /* Load basic modules */ engine_register(engine, "iterate"); - engine_register(engine, "itercache"); + engine_register(engine, "rrcache"); engine_register(engine, "pktcache"); /* Initialize storage backends */ diff --git a/lib/README.rst b/lib/README.rst index 1e3fe89d2..5828ce68a 100644 --- a/lib/README.rst +++ b/lib/README.rst @@ -33,7 +33,7 @@ Writing layers The resolver :ref:`library ` leverages the `processing API`_ from the libknot to separate packet processing code into layers. In order to keep the core library sane and coverable, there are only two built-in layers: -the :c:func:`iterate_layer`, and the :c:func:`itercache_layer`. +the :c:func:`iterate_layer`, and the :c:func:`rrcache_layer`. *Note* |---| This is only crash-course in the library internals, see the resolver :ref:`library ` documentation for the complete overview of the services. diff --git a/lib/layer/itercache.c b/lib/layer/rrcache.c similarity index 99% rename from lib/layer/itercache.c rename to lib/layer/rrcache.c index f1283ab4d..94a590dee 100644 --- a/lib/layer/itercache.c +++ b/lib/layer/rrcache.c @@ -247,7 +247,7 @@ static int stash(knot_layer_t *ctx, knot_pkt_t *pkt) } /** Module implementation. */ -const knot_layer_api_t *itercache_layer(void) +const knot_layer_api_t *rrcache_layer(void) { static const knot_layer_api_t _layer = { .begin = &begin, @@ -258,4 +258,4 @@ const knot_layer_api_t *itercache_layer(void) return &_layer; } -KR_MODULE_EXPORT(itercache) +KR_MODULE_EXPORT(rrcache) diff --git a/lib/layer/itercache.h b/lib/layer/rrcache.h similarity index 93% rename from lib/layer/itercache.h rename to lib/layer/rrcache.h index 532196b08..cb5474664 100644 --- a/lib/layer/itercache.h +++ b/lib/layer/rrcache.h @@ -19,4 +19,4 @@ #include "lib/layer.h" /* Processing module implementation. */ -extern const knot_layer_api_t *itercache_layer(void); +extern const knot_layer_api_t *rrcache_layer(void); diff --git a/lib/lib.mk b/lib/lib.mk index 52b4881a0..f43b38b8d 100644 --- a/lib/lib.mk +++ b/lib/lib.mk @@ -6,7 +6,7 @@ libkresolve_SOURCES := \ $(ccan_EMBED) \ lib/generic/map.c \ lib/layer/iterate.c \ - lib/layer/itercache.c \ + lib/layer/rrcache.c \ lib/layer/pktcache.c \ lib/utils.c \ lib/nsrep.c \ diff --git a/lib/resolve.c b/lib/resolve.c index 6628400c4..75fc3cd43 100644 --- a/lib/resolve.c +++ b/lib/resolve.c @@ -22,10 +22,9 @@ #include #include +#include "lib/layer.h" #include "lib/rplan.h" #include "lib/resolve.h" -#include "lib/layer/itercache.h" -#include "lib/layer/iterate.h" #define DEBUG_MSG(fmt...) QRDEBUG(kr_rplan_current(rplan), "resl", fmt) diff --git a/lib/resolve.h b/lib/resolve.h index ec8db797a..eefc75d0d 100644 --- a/lib/resolve.h +++ b/lib/resolve.h @@ -42,7 +42,7 @@ * * // Push basic layers * array_push(ctx.layers, iterate_layer); - * array_push(ctx.layers, itercache_layer); + * array_push(ctx.layers, rrcache_layer); * * // Resolve "IN A cz." * knot_pkt_t *answer = knot_pkt_new(NULL, 65535, ctx.pool); diff --git a/tests/test_integration.c b/tests/test_integration.c index 6a23ff3cd..2ccc50d38 100644 --- a/tests/test_integration.c +++ b/tests/test_integration.c @@ -57,7 +57,7 @@ static PyObject* init(PyObject* self, PyObject* args) return NULL; } kr_module_load(&global_modules.at[0], "iterate", NULL); - kr_module_load(&global_modules.at[1], "itercache", NULL); + kr_module_load(&global_modules.at[1], "rrcache", NULL); global_modules.len = 2; /* Initialize resolution context */