aboutsummaryrefslogtreecommitdiff
path: root/nDPId.c
diff options
context:
space:
mode:
Diffstat (limited to 'nDPId.c')
-rw-r--r--nDPId.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/nDPId.c b/nDPId.c
index 8d2dc8adc..bb7b1d4ec 100644
--- a/nDPId.c
+++ b/nDPId.c
@@ -1859,8 +1859,7 @@ static void process_idle_flow(struct nDPId_reader_thread * const reader_thread,
{
uint8_t protocol_was_guessed = 0;
- if (ndpi_is_protocol_detected(workflow->ndpi_struct,
- flow->info.detection_data->guessed_l7_protocol) == 0)
+ if (ndpi_is_protocol_detected(flow->info.detection_data->guessed_l7_protocol) == 0)
{
flow->info.detection_data->guessed_l7_protocol =
ndpi_detection_giveup(workflow->ndpi_struct,
@@ -4199,7 +4198,7 @@ static void ndpi_process_packet(uint8_t * const args,
workflow->last_thread_time / 1000,
NULL);
- if (ndpi_is_protocol_detected(workflow->ndpi_struct, flow_to_process->flow_extended.detected_l7_protocol) != 0 &&
+ if (ndpi_is_protocol_detected(flow_to_process->flow_extended.detected_l7_protocol) != 0 &&
flow_to_process->info.detection_completed == 0)
{
flow_to_process->info.detection_completed = 1;
@@ -4212,9 +4211,7 @@ static void ndpi_process_packet(uint8_t * const args,
flow_to_process->flow_extended.packets_processed[FD_DST2SRC] ==
1)
{
- ndpi_unset_risk(workflow->ndpi_struct,
- &flow_to_process->info.detection_data->flow,
- NDPI_UNIDIRECTIONAL_TRAFFIC);
+ ndpi_unset_risk(&flow_to_process->info.detection_data->flow, NDPI_UNIDIRECTIONAL_TRAFFIC);
}
jsonize_flow_detection_event(reader_thread, flow_to_process, FLOW_EVENT_DETECTED);
flow_to_process->info.detection_data->last_ndpi_flow_struct_hash =
@@ -4255,11 +4252,11 @@ static void ndpi_process_packet(uint8_t * const args,
if (flow_to_process->info.detection_data->flow.num_processed_pkts ==
nDPId_options.max_packets_per_flow_to_process ||
- (ndpi_is_protocol_detected(workflow->ndpi_struct, flow_to_process->flow_extended.detected_l7_protocol) != 0 &&
+ (ndpi_is_protocol_detected(flow_to_process->flow_extended.detected_l7_protocol) != 0 &&
ndpi_extra_dissection_possible(workflow->ndpi_struct, &flow_to_process->info.detection_data->flow) == 0))
{
struct ndpi_proto detected_l7_protocol = flow_to_process->flow_extended.detected_l7_protocol;
- if (ndpi_is_protocol_detected(workflow->ndpi_struct, detected_l7_protocol) == 0)
+ if (ndpi_is_protocol_detected(detected_l7_protocol) == 0)
{
detected_l7_protocol = flow_to_process->info.detection_data->guessed_l7_protocol;
}