]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
daemon/engine: fixed Lua 5.2 compatibility
authorMarek Vavruša <marek.vavrusa@nic.cz>
Tue, 21 Jul 2015 12:41:57 +0000 (14:41 +0200)
committerMarek Vavruša <marek.vavrusa@nic.cz>
Tue, 21 Jul 2015 12:42:03 +0000 (14:42 +0200)
daemon/engine.c

index d9b078c70bee50451250350f259eddcf83c3953c..5db9afa3a7cc266452f4f0c63d9f22536acb00be 100644 (file)
@@ -358,7 +358,9 @@ static int engine_loadconf(struct engine *engine)
        }
        /* Use module path for including Lua scripts */
        int ret = engine_cmd(engine, "package.path = package.path..';" PREFIX MODULEDIR "/?.lua'");
-       lua_pop(engine->L, 1);
+       if (ret > 0) {
+               lua_pop(engine->L, 1);
+       }
 
        /* Load config file */
        if(access("config", F_OK ) != -1 ) {