The probing parser registration function
AppLayerProtoDetectPPParseConfPorts was a void, meaning it would
give no feedback to the registering protocol implementation. If a
config was missing, it would just give up.
This patch changes it to return a bool. 0 if no config was found,
1 if a config was found.
This allows the caller to setup a default case.
SCReturn;
}
-void AppLayerProtoDetectPPParseConfPorts(const char *ipproto_name,
+int AppLayerProtoDetectPPParseConfPorts(const char *ipproto_name,
uint8_t ipproto,
const char *alproto_name,
AppProto alproto,
int r;
ConfNode *node;
ConfNode *port_node = NULL;
+ int config = 0;
r = snprintf(param, sizeof(param), "%s%s%s", "app-layer.protocols.",
alproto_name, ".detection-ports");
}
+ config = 1;
end:
- SCReturn;
+ SCReturnInt(config);
}
/***** PM registration *****/
uint16_t min_depth, uint16_t max_depth,
uint8_t direction,
ProbingParserFPtr ProbingParser);
-void AppLayerProtoDetectPPParseConfPorts(const char *ipproto_name,
+/**
+ * \retval bool 0 if no config was found, 1 if config was found
+ */
+int AppLayerProtoDetectPPParseConfPorts(const char *ipproto_name,
uint8_t ipproto,
const char *alproto_name,
AppProto alproto,