+15/07/22 - build 162
+
+-- enable build dependency tracking
+-- cleanup automake and cmake foo
+-- updated bug list
+-- added Lua stack manager and updated code that manipulated a persistent lua_State
+ thanks to Sancho Panza (sancho@posteo.de) for reporting the issue
+-- piglet updates and fixes
+-- dev guide - convert snort includes into links
+-- fixup includes
+
15/07/15 - build 161
-- added piglet plugin test harness
#include <stdexcept>
#include "framework/module.h"
+#include "helpers/lua.h"
#include "managers/module_manager.h"
#include "parser/parser.h"
#include "log/messages.h"
static void load_config(lua_State* L, const char* file)
{
+ Lua::ManageStack ms(L);
+
if ( luaL_loadfile(L, file) )
{
FatalError("can't load %s: %s\n", file, lua_tostring(L, -1));
}
if ( lua_pcall(L, 0, 0, 0) )
- {
FatalError("can't init %s: %s\n", file, lua_tostring(L, -1));
- return;
- }
}
static void load_overrides(lua_State* L, string& s)
{
+ Lua::ManageStack ms(L);
+
if ( luaL_loadstring(L, s.c_str()) )
{
const char* err = lua_tostring(L, -1);
}
if ( lua_pcall(L, 0, 0, 0) )
- {
FatalError("can't init overrides: %s\n", lua_tostring(L, -1));
- return;
- }
}
static void run_config(lua_State* L, const char* t)
{
+ Lua::ManageStack ms(L);
+
lua_getglobal(L, "snort_config");
lua_getglobal(L, t);
void Shell::execute(const char* cmd, string& rsp)
{
int err = 0;
+ Lua::ManageStack ms(lua);
try
{