pfring: update thread count callback to match API change

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

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

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

Loading…
Cancel
Save