]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #305 in SNORT/snort3 from crc/reload to master
authorRuss Combs (rucombs) <rucombs@cisco.com>
Mon, 29 Feb 2016 20:27:04 +0000 (15:27 -0500)
committerRuss Combs (rucombs) <rucombs@cisco.com>
Mon, 29 Feb 2016 20:27:04 +0000 (15:27 -0500)
Squashed commit of the following:

commit 361540f80cafb2f8a80ea169aa35d2200bda7a10
Author: snorty <snorty@localhost.localdomain>
Date:   Mon Feb 29 15:15:23 2016 -0500

    fix conf reload by signal to use -c filename

src/main.cc

index a89377fff9922a535bb1b49f5f40eb3130e920da..6ab2fce5a02838e8166dff87fe8d03810a744dfd 100644 (file)
@@ -305,8 +305,13 @@ int main_reload_config(lua_State* L)
         request.respond("== reload pending; retry\n");
         return 0;
     }
-    Lua::ManageStack(L, 1);
-    const char* fname = luaL_checkstring(L, 1);
+    const char* fname =  nullptr;
+
+    if ( L )
+    {
+        Lua::ManageStack(L, 1);
+        fname = luaL_checkstring(L, 1);
+    }
 
     request.respond(".. reloading configuration\n");
     SnortConfig* old = snort_conf;