From 592b769f67a0257582f49e079e2b49db772eeb7a Mon Sep 17 00:00:00 2001 From: MaYuming Date: Sun, 25 Jun 2017 11:15:59 +0800 Subject: fix lync over ICE detection --- src/lib/protocols/stun.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib/protocols/stun.c b/src/lib/protocols/stun.c index 8c42f56c9..37feb2871 100644 --- a/src/lib/protocols/stun.c +++ b/src/lib/protocols/stun.c @@ -98,7 +98,6 @@ static ndpi_int_stun_t ndpi_int_check_stun(struct ndpi_detection_module_struct * case 0x8054: /* Candidate Identifier */ if((len == 4) - && ((payload[offset+4] == 0x31) || (payload[offset+4] == 0x34)) && (payload[offset+5] == 0x00) && (payload[offset+6] == 0x00) && (payload[offset+7] == 0x00)) { @@ -266,7 +265,7 @@ void ndpi_search_stun(struct ndpi_detection_module_struct *ndpi_struct, struct n NDPI_LOG(NDPI_PROTOCOL_STUN, ndpi_struct, NDPI_LOG_DEBUG, "found UDP stun.\n"); ndpi_int_stun_add_connection(ndpi_struct, is_whatsapp ? NDPI_PROTOCOL_WHATSAPP_VOICE : NDPI_PROTOCOL_STUN, flow); - } + } return; } } -- cgit v1.2.3 From a40507b8b27399ab674b504a861c3ec69a7fd063 Mon Sep 17 00:00:00 2001 From: MaYuming Date: Sun, 25 Jun 2017 16:58:50 +0800 Subject: fix compiler error about json --- example/ndpiReader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example/ndpiReader.c b/example/ndpiReader.c index 09b909c22..8d8ad85fe 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -2270,7 +2270,7 @@ void automataUnitTest() { * @brief Produce port based pbf filter for port array * and saves it in .json format */ - +#ifdef HAVE_JSON_C void bpf_filter_produce_filter(int port_array[], int size, char *filePath){ char *prefix = "bpf_filter_"; char _filterFilePath[1024]; @@ -2319,7 +2319,7 @@ void bpf_filter_produce_filter(int port_array[], int size, char *filePath){ printf("created: %s\n", _filterFilePath); } - +#endif /* *********************************************** */ /** * @brief Initialize port array -- cgit v1.2.3