]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
build 162; manage lua stack in shell; update change log
authorRuss Combs <rucombs@cisco.com>
Wed, 22 Jul 2015 23:12:43 +0000 (19:12 -0400)
committerRuss Combs <rucombs@cisco.com>
Wed, 22 Jul 2015 23:12:43 +0000 (19:12 -0400)
ChangeLog
src/main/build.h
src/main/shell.cc

index fd0dd8de04536fbfdf22a732740727087ab2e9f8..e48a8a80cee8e566ef058dc3b694cf352bad7f34 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+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
index 91e68cf274597766ca6073e1f381a8217b40d370..7945649b736f4a30a4eb18b7d0dc2cea38189d66 100644 (file)
@@ -10,7 +10,7 @@
 //                                               //
 //-----------------------------------------------//
 
-#define BUILD "161"
+#define BUILD "162"
 
 #endif
 
index 1992c9be5c3479221ba18078beaf80fde557e7e3..997be09eacd8ccca56a659e0bc6952d9d0a7d7bb 100644 (file)
@@ -26,6 +26,7 @@
 #include <stdexcept>
 
 #include "framework/module.h"
+#include "helpers/lua.h"
 #include "managers/module_manager.h"
 #include "parser/parser.h"
 #include "log/messages.h"
@@ -68,6 +69,8 @@ static int get_line_number(lua_State* L)
 
 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));
@@ -75,14 +78,13 @@ static void load_config(lua_State* L, const char* file)
     }
 
     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);
@@ -93,14 +95,13 @@ static void load_overrides(lua_State* L, string& s)
     }
 
     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);
 
@@ -191,6 +192,7 @@ void Shell::install(const char* name, const luaL_Reg* reg)
 void Shell::execute(const char* cmd, string& rsp)
 {
     int err = 0;
+    Lua::ManageStack ms(lua);
 
     try
     {