]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
daemon/bindings: cleanup
authorMarek Vavruša <marek.vavrusa@nic.cz>
Mon, 15 Jun 2015 08:25:05 +0000 (10:25 +0200)
committerMarek Vavruša <marek.vavrusa@nic.cz>
Mon, 15 Jun 2015 08:30:49 +0000 (10:30 +0200)
daemon/bindings.c
daemon/bindings.h
daemon/daemon.mk
lib/layer/iterate.c

index 9bf8338906dd43c85300275ac912878bcced834c..66ac0454a91254e398a0f6347b4b9f9db00ebffe 100644 (file)
@@ -42,17 +42,6 @@ static int format_error(lua_State* L, const char *err)
        return 1;
 }
 
-/** @internal Compatibility wrapper for Lua 5.0 - 5.2 */
-#if LUA_VERSION_NUM >= 502
-#define register_lib(L, name, lib) \
-       luaL_newlib((L), (lib))
-#else
-#define lua_rawlen(L, obj) \
-       lua_objlen((L), (obj))
-#define register_lib(L, name, lib) \
-       luaL_openlib((L), (name), (lib), 0)
-#endif
-
 /** List loaded modules */
 static int mod_list(lua_State *L)
 {
index b6e0b1d1d6f13a789d2400021f23a8b13aa621c7..f350088f5e4e23a5862a25de06c46beafd0c87c4 100644 (file)
 
 #include "daemon/engine.h"
 
+ /** @internal Compatibility wrapper for Lua 5.0 - 5.2 */
+ #if LUA_VERSION_NUM >= 502
+ #define register_lib(L, name, lib) \
+       luaL_newlib((L), (lib))
+ #else
+ #define lua_rawlen(L, obj) \
+       lua_objlen((L), (obj))
+ #define register_lib(L, name, lib) \
+       luaL_openlib((L), (name), (lib), 0)
+ #endif
+
 /**
  * Load 'modules' package.
  * @param  L scriptable
index 829fa69bef31e6efeabc80c47502291dd95c9480..958308cc66eb6455ab2d47ce1d0966fce83af80a 100644 (file)
@@ -8,6 +8,7 @@ kresd_SOURCES := \
        daemon/worker.c      \
        daemon/bindings.c    \
        daemon/ffimodule.c   \
+       daemon/bindings/kres.c \
        daemon/main.c
 
 # Embed resources
index 814893d16cb02b9f86d5e259f46398ff23f141ac..2c0ff2f166a7503799e9fc132d824e3c37cb47d1 100644 (file)
@@ -370,6 +370,7 @@ int kr_make_query(struct kr_query *query, knot_pkt_t *pkt)
        /* Query built, expect answer. */
        query->id = isaac_next_uint(&ISAAC, UINT16_MAX);
        knot_wire_set_id(pkt->wire, query->id);
+       pkt->parsed = pkt->size;
        return kr_ok();
 }