postgres: improve detection (#1831)

Remove some dead code (found via coverage report)
This commit is contained in:
Ivan Nardi
2022-12-22 21:41:32 +01:00
committed by GitHub
parent e9d5e72fb5
commit 5fafe8374a
14 changed files with 39 additions and 73 deletions
+1 -5
View File
@@ -243,7 +243,7 @@ static void ndpi_check_steam_udp3(struct ndpi_detection_module_struct *ndpi_stru
}
/* This is a packet in another direction. Check if we find the proper response. */
if ((payload_len == 0) || ((payload_len == 8) && (packet->payload[0] == 0x3a) && (packet->payload[1] == 0x18) && (packet->payload[2] == 0x00) && (packet->payload[3] == 0x00))) {
if ((payload_len == 8) && (packet->payload[0] == 0x3a) && (packet->payload[1] == 0x18) && (packet->payload[2] == 0x00) && (packet->payload[3] == 0x00)) {
NDPI_LOG_INFO(ndpi_struct, "found STEAM\n");
ndpi_int_steam_add_connection(ndpi_struct, flow);
} else {
@@ -281,10 +281,6 @@ void ndpi_search_steam(struct ndpi_detection_module_struct *ndpi_struct, struct
return;
}
/* skip marked packets */
if(flow->detected_protocol_stack[0] == NDPI_PROTOCOL_STEAM)
return;
NDPI_LOG_DBG(ndpi_struct, "search STEAM\n");
ndpi_check_steam_http(ndpi_struct, flow);