From: Victor Julien Date: Thu, 20 Feb 2014 16:55:15 +0000 (+0100) Subject: output-lua: register common callbacks X-Git-Tag: suricata-2.1beta2~152 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c5ff94a319fd38b7a1ab2b45b34b8eaf2c8c273f;p=thirdparty%2Fsuricata.git output-lua: register common callbacks Clean up callback registration in the setup-stage and register common callbacks. --- diff --git a/src/output-lua.c b/src/output-lua.c index 97cebb2c7e..18ebdff64f 100644 --- a/src/output-lua.c +++ b/src/output-lua.c @@ -431,10 +431,11 @@ static lua_State *LuaScriptSetup(const char *filename) } //LuaPrintStack(luastate); - if (1) { //http - if (LogLuaRegisterHttpFunctions(luastate) != 0) - SCLogInfo("boooh!"); - } + /* register functions common to all */ + LogLuaRegisterFunctions(luastate); + /* unconditionally register http function. They will only work + * if the tx is registered in the state at runtime though. */ + LogLuaRegisterHttpFunctions(luastate); SCLogDebug("lua_State %p is set up", luastate); return luastate;