@@ -134,7 +134,7 @@ static void *OldParsePfringConfig(const char *iface)
134134 SCLogInfo ("%s: ZC interface detected, not setting cluster-id" , pfconf -> iface );
135135 } else if ((pfconf -> threads == 1 ) && (strncmp (pfconf -> iface , "dna" , 3 ) == 0 )) {
136136 SCLogInfo ("DNA interface detected, not setting cluster-id" );
137- } else if (SCConfGet ("pfring.cluster-id" , & tmpclusterid ) != 1 ) {
137+ } else if (SCConfGetNonNull ("pfring.cluster-id" , & tmpclusterid ) != 1 ) {
138138 SCLogError ("Could not get cluster-id from config" );
139139 } else {
140140 if (StringParseInt32 (& pfconf -> cluster_id , 10 , 0 , (const char * )tmpclusterid ) < 0 ) {
@@ -152,7 +152,7 @@ static void *OldParsePfringConfig(const char *iface)
152152 } else if ((pfconf -> threads == 1 ) && (strncmp (pfconf -> iface , "dna" , 3 ) == 0 )) {
153153 SCLogInfo (
154154 "%s: DNA interface detected, not setting cluster type for PF_RING" , pfconf -> iface );
155- } else if (SCConfGet ("pfring.cluster-type" , & tmpctype ) != 1 ) {
155+ } else if (SCConfGetNonNull ("pfring.cluster-type" , & tmpctype ) != 1 ) {
156156 SCLogError ("Could not get cluster-type from config" );
157157 } else if (strcmp (tmpctype , "cluster_round_robin" ) == 0 ) {
158158 SCLogInfo ("%s: Using round-robin cluster mode for PF_RING" , pfconf -> iface );
@@ -275,7 +275,7 @@ static void *ParsePfringConfig(const char *iface)
275275 (void )SC_ATOMIC_ADD (pfconf -> ref , pfconf -> threads );
276276
277277 /* command line value has precedence */
278- if (SCConfGet ("pfring.cluster-id" , & tmpclusterid ) == 1 ) {
278+ if (SCConfGetNonNull ("pfring.cluster-id" , & tmpclusterid ) == 1 ) {
279279 if (StringParseInt32 (& pfconf -> cluster_id , 10 , 0 , (const char * )tmpclusterid ) < 0 ) {
280280 SCLogWarning ("Invalid value for "
281281 "pfring.cluster-id: '%s'. Resetting to 1." ,
@@ -425,7 +425,7 @@ static int GetDevAndParser(const char **live_dev, ConfigIfaceParserFunc *parser)
425425 * parser = OldParsePfringConfig ;
426426 /* In v1: try to get interface name from config */
427427 if (* live_dev == NULL ) {
428- if (SCConfGet ("pfring.interface" , live_dev ) == 1 ) {
428+ if (SCConfGetNonNull ("pfring.interface" , live_dev ) == 1 ) {
429429 SCLogInfo ("Using interface %s" , * live_dev );
430430 LiveRegisterDevice (* live_dev );
431431 } else {
0 commit comments