Category cleanup
This commit is contained in:
+3
-12
@@ -5698,14 +5698,6 @@ static const char* categories[] = {
|
|||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
"AVI",
|
|
||||||
"Flash",
|
|
||||||
"OGG",
|
|
||||||
"MPEG",
|
|
||||||
"QuickTime",
|
|
||||||
"RealMedia",
|
|
||||||
"WindowsMedia",
|
|
||||||
"Webm", /* 32 */
|
|
||||||
"Music",
|
"Music",
|
||||||
"Video",
|
"Video",
|
||||||
"Shopping",
|
"Shopping",
|
||||||
@@ -5791,9 +5783,7 @@ const char* ndpi_category_get_name(struct ndpi_detection_module_struct *ndpi_mod
|
|||||||
if((!ndpi_mod) || (category >= NDPI_PROTOCOL_NUM_CATEGORIES))
|
if((!ndpi_mod) || (category >= NDPI_PROTOCOL_NUM_CATEGORIES))
|
||||||
return(NULL);
|
return(NULL);
|
||||||
|
|
||||||
if((category < NDPI_PROTOCOL_CATEGORY_CUSTOM_1) || (category >= CUSTOM_CATEGORY_MINING))
|
if((category >= NDPI_PROTOCOL_CATEGORY_CUSTOM_1) && (category <= NDPI_PROTOCOL_CATEGORY_CUSTOM_5)) {
|
||||||
return(categories[category]);
|
|
||||||
else {
|
|
||||||
switch(category) {
|
switch(category) {
|
||||||
case NDPI_PROTOCOL_CATEGORY_CUSTOM_1:
|
case NDPI_PROTOCOL_CATEGORY_CUSTOM_1:
|
||||||
return(ndpi_mod->custom_category_labels[0]);
|
return(ndpi_mod->custom_category_labels[0]);
|
||||||
@@ -5810,7 +5800,8 @@ const char* ndpi_category_get_name(struct ndpi_detection_module_struct *ndpi_mod
|
|||||||
default:
|
default:
|
||||||
return("Unspecified");
|
return("Unspecified");
|
||||||
}
|
}
|
||||||
}
|
} else
|
||||||
|
return(categories[category]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ****************************************************** */
|
/* ****************************************************** */
|
||||||
|
|||||||
Reference in New Issue
Block a user