diff options
author | Luca Deri <deri@ntop.org> | 2025-06-09 13:07:27 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2025-06-09 13:07:27 +0200 |
commit | 6c23ed9db60a6016677c9852032e03c88a4dd4bf (patch) | |
tree | 33625626dfadf191789562d81656463b7d419121 /src/lib/ndpi_main.c | |
parent | f9709834a858e894dbb27b2a5ac5565d25ff2f5e (diff) |
Cosmetic changes
Added ndpi finalization in case protocols are dumped
Diffstat (limited to 'src/lib/ndpi_main.c')
-rw-r--r-- | src/lib/ndpi_main.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 9089f525b..0401367ac 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -3938,6 +3938,7 @@ struct ndpi_detection_module_struct *ndpi_init_detection_module(struct ndpi_glob /* By default, all protocols are enabled */ return ndpi_init_detection_module_ext(g_ctx, NULL); } + /* ******************************************************************** */ struct ndpi_detection_module_struct *ndpi_init_detection_module_ext(struct ndpi_global_context *g_ctx, @@ -11123,7 +11124,6 @@ int ndpi_get_category_id(struct ndpi_detection_module_struct *ndpi_str, char *ca /* ****************************************************** */ - static char *default_ports_string(char *ports_str, ndpi_port_range *default_ports){ //dont display zero ports on help screen @@ -11147,19 +11147,18 @@ static char *default_ports_string(char *ports_str, ndpi_port_range *default_port ports_str[strlen(ports_str)-1] = '\0'; return ports_str; - } /* ****************************************************** */ - void ndpi_dump_protocols(struct ndpi_detection_module_struct *ndpi_str, FILE *dump_out) { int i; if(!ndpi_str || !dump_out) return; + ndpi_finalize_initialization(ndpi_str); + for(i = 0; i < (int)ndpi_get_num_protocols(ndpi_str); i++) { - char udp_ports[128] = ""; char tcp_ports[128] = ""; |