list keywords: restore 2.0 similar output

Unset was previously displayed if the application layer was not
set. Code before this patch was displaying '(null)' which is not
user friendly.
pull/1435/head
Eric Leblond 10 years ago committed by Victor Julien
parent 568635c2e1
commit d98060410c

@ -4902,8 +4902,8 @@ static inline void SigMultilinePrint(int i, char *prefix)
void SigTableList(const char *keyword)
{
size_t size = sizeof(sigmatch_table) / sizeof(SigTableElmt);
size_t i;
char *proto_name;
if (keyword == NULL) {
printf("=====Supported keywords=====\n");
@ -4928,8 +4928,8 @@ void SigTableList(const char *keyword)
printf("%s", sigmatch_table[i].desc);
}
/* Build feature */
printf(";%s;",
AppLayerGetProtoName(sigmatch_table[i].alproto));
proto_name = AppLayerGetProtoName(sigmatch_table[i].alproto);
printf(";%s;", proto_name ? proto_name : "Unset");
PrintFeatureList(sigmatch_table[i].flags, ':');
printf(";");
if (sigmatch_table[i].url) {

Loading…
Cancel
Save