X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/d188e71c0b1175978dd4dbb97e61167ca6d163ce..a5b8198c962e024e23f77fd8b6d68a129f4c46e7:/projects/stargazer/plugins/capture/nfqueue/nfqueue.cpp?ds=inline diff --git a/projects/stargazer/plugins/capture/nfqueue/nfqueue.cpp b/projects/stargazer/plugins/capture/nfqueue/nfqueue.cpp index 6a339523..0c14c10f 100644 --- a/projects/stargazer/plugins/capture/nfqueue/nfqueue.cpp +++ b/projects/stargazer/plugins/capture/nfqueue/nfqueue.cpp @@ -93,11 +93,11 @@ return "cap_nfqueue v.1.0"; } //----------------------------------------------------------------------------- NFQ_CAP::NFQ_CAP() - : errorStr(), - thread(), - nonstop(false), + : nonstop(false), isRunning(false), queueNumber(0), + nfqHandle(NULL), + queueHandle(NULL), 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++) - 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);