]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: lua: reset flags before resuming execution
authorThierry FOURNIER <tfournier@exceliance.fr>
Thu, 5 Mar 2015 16:10:14 +0000 (17:10 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 9 Mar 2015 16:47:52 +0000 (17:47 +0100)
This patch reset the flags except th run flag before resuming
the Lua execution. If this initialisation is not done, some
flags can remain at the end of the Lua execution and give bad
informations.

src/hlua.c

index cc88bd1a59493e115b8caedab21995fe0c858887..b9291467641978cf19c7171f54985c7da8f6faf3 100644 (file)
@@ -685,6 +685,9 @@ resume_execution:
         */
        lua_sethook(lua->T, hlua_hook, LUA_MASKCOUNT, hlua_nb_instruction);
 
+       /* Remove all flags except the running flags. */
+       lua->flags = HLUA_RUN;
+
        /* Call the function. */
        ret = lua_resume(lua->T, gL.T, lua->nargs);
        switch (ret) {