aboutsummaryrefslogtreecommitdiff
path: root/src/lib/ndpi_main.c
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2023-09-02 19:27:19 +0200
committerLuca Deri <deri@ntop.org>2023-09-02 19:27:19 +0200
commitf0dc3347ec92a55c16b7033e1b7f2890892b3094 (patch)
treecbecb7c62a364e9dd1501d2837ce46a2d28bc7f8 /src/lib/ndpi_main.c
parent1d480c18e381f393bd25352c6140e9651f3e3a76 (diff)
Merged new and old version of ndpi_domain_classify.c code
Diffstat (limited to 'src/lib/ndpi_main.c')
-rw-r--r--src/lib/ndpi_main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index c5a085be6..d5e2cecef 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -4206,6 +4206,9 @@ int ndpi_load_category_file(struct ndpi_detection_module_struct *ndpi_str,
while((line[len] == '\n') || (line[len] == '\r'))
line[len--] = '\0';
+ while((line[0] == '-') || (line[0] == '.'))
+ line++;
+
if(ndpi_load_category(ndpi_str, line, category_id, NULL) > 0)
num_loaded++;
}