]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/capture/nfqueue/nfqueue.cpp
Merge branch 'stg-2.409' into stg-2.409-radius
[stg.git] / projects / stargazer / plugins / capture / nfqueue / nfqueue.cpp
index 6a339523bc381416308692d0d3f446aee9a28143..0c14c10f570f44e932fc42eab7238e351a772daa 100644 (file)
@@ -93,11 +93,11 @@ return "cap_nfqueue v.1.0";
 }
 //-----------------------------------------------------------------------------
 NFQ_CAP::NFQ_CAP()
 }
 //-----------------------------------------------------------------------------
 NFQ_CAP::NFQ_CAP()
-    : errorStr(),
-      thread(),
-      nonstop(false),
+    : nonstop(false),
       isRunning(false),
       queueNumber(0),
       isRunning(false),
       queueNumber(0),
+      nfqHandle(NULL),
+      queueHandle(NULL),
       traffCnt(NULL),
       logger(GetPluginLogger(GetStgLogger(), "cap_nfqueue"))
 {
       traffCnt(NULL),
       logger(GetPluginLogger(GetStgLogger(), "cap_nfqueue"))
 {
@@ -106,8 +106,8 @@ NFQ_CAP::NFQ_CAP()
 int NFQ_CAP::ParseSettings()
 {
 for (size_t i = 0; i < settings.moduleParams.size(); i++)
 int NFQ_CAP::ParseSettings()
 {
 for (size_t i = 0; i < settings.moduleParams.size(); i++)
-    if (settings.moduleParams[i].param == "queueNumber")
-        if (str2x(settings.moduleParams[i].param, queueNumber) < 0)
+    if (settings.moduleParams[i].param == "queueNumber" && !settings.moduleParams[i].value.empty())
+        if (str2x(settings.moduleParams[i].value[0], queueNumber) < 0)
             {
             errorStr = "Queue number should be a number. Got: '" + settings.moduleParams[i].param + "'";
             logger(errorStr);
             {
             errorStr = "Queue number should be a number. Got: '" + settings.moduleParams[i].param + "'";
             logger(errorStr);