Skip to content

Commit 7807b47

Browse files
committed
pfring: update thread count callback to match API change
Use uint16_t internally and in parsing as well.
1 parent b633887 commit 7807b47

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

plugins/pfring/runmode-pfring.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ static void *OldParsePfringConfig(const char *iface)
115115
pfconf->threads = 1;
116116
} else {
117117
if (threadsstr != NULL) {
118-
if (StringParseInt32(&pfconf->threads, 10, 0, threadsstr) < 0) {
118+
if (StringParseUnt16(&pfconf->threads, 10, 0, threadsstr) < 0) {
119119
SCLogWarning("Invalid value for "
120120
"pfring.threads: '%s'. Resetting to 1.",
121121
threadsstr);
@@ -396,7 +396,7 @@ static void *ParsePfringConfig(const char *iface)
396396
return pfconf;
397397
}
398398

399-
static int PfringConfigGetThreadsCount(void *conf)
399+
static uint16_t PfringConfigGetThreadsCount(void *conf)
400400
{
401401
PfringIfaceConfig *pfp = (PfringIfaceConfig *)conf;
402402
return pfp->threads;

plugins/pfring/source-pfring.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ typedef struct PfringIfaceConfig_ {
4141

4242
char iface[PFRING_IFACE_NAME_LENGTH];
4343
/* number of threads */
44-
int threads;
44+
uint16_t threads;
4545

4646
const char *bpf_filter;
4747

0 commit comments

Comments
 (0)