X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/d188e71c0b1175978dd4dbb97e61167ca6d163ce..50419f0521446b8e698a391e3c2cb3fc711733ce:/projects/stargazer/plugins/capture/nfqueue/nfqueue.cpp 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);