pfring: update thread count callback to match API change

Use uint16_t internally and in parsing as well.
pull/13926/head
Victor Julien 2 months ago committed by Victor Julien
parent b633887d83
commit 7807b47ca0

@ -115,7 +115,7 @@ static void *OldParsePfringConfig(const char *iface)
pfconf->threads = 1; pfconf->threads = 1;
} else { } else {
if (threadsstr != NULL) { if (threadsstr != NULL) {
if (StringParseInt32(&pfconf->threads, 10, 0, threadsstr) < 0) { if (StringParseUnt16(&pfconf->threads, 10, 0, threadsstr) < 0) {
SCLogWarning("Invalid value for " SCLogWarning("Invalid value for "
"pfring.threads: '%s'. Resetting to 1.", "pfring.threads: '%s'. Resetting to 1.",
threadsstr); threadsstr);
@ -396,7 +396,7 @@ static void *ParsePfringConfig(const char *iface)
return pfconf; return pfconf;
} }
static int PfringConfigGetThreadsCount(void *conf) static uint16_t PfringConfigGetThreadsCount(void *conf)
{ {
PfringIfaceConfig *pfp = (PfringIfaceConfig *)conf; PfringIfaceConfig *pfp = (PfringIfaceConfig *)conf;
return pfp->threads; return pfp->threads;

@ -41,7 +41,7 @@ typedef struct PfringIfaceConfig_ {
char iface[PFRING_IFACE_NAME_LENGTH]; char iface[PFRING_IFACE_NAME_LENGTH];
/* number of threads */ /* number of threads */
int threads; uint16_t threads;
const char *bpf_filter; const char *bpf_filter;

Loading…
Cancel
Save