Further WhatsApp improvements
This commit is contained in:
+13
-1
@@ -1438,6 +1438,7 @@ static void node_idle_scan_walker(const void *node, ndpi_VISIT which, int depth,
|
||||
}
|
||||
}
|
||||
|
||||
/* *********************************************** */
|
||||
|
||||
/**
|
||||
* @brief On Protocol Discover - demo callback
|
||||
@@ -1448,6 +1449,8 @@ static void on_protocol_discovered(struct ndpi_workflow * workflow,
|
||||
;
|
||||
}
|
||||
|
||||
/* *********************************************** */
|
||||
|
||||
#if 0
|
||||
/**
|
||||
* @brief Print debug
|
||||
@@ -1455,7 +1458,6 @@ static void on_protocol_discovered(struct ndpi_workflow * workflow,
|
||||
static void debug_printf(u_int32_t protocol, void *id_struct,
|
||||
ndpi_log_level_t log_level,
|
||||
const char *format, ...) {
|
||||
|
||||
va_list va_ap;
|
||||
#ifndef WIN32
|
||||
struct tm result;
|
||||
@@ -1489,6 +1491,8 @@ static void debug_printf(u_int32_t protocol, void *id_struct,
|
||||
}
|
||||
#endif
|
||||
|
||||
/* *********************************************** */
|
||||
|
||||
/**
|
||||
* @brief Setup for detection begin
|
||||
*/
|
||||
@@ -1576,6 +1580,7 @@ static void setupDetection(u_int16_t thread_id, pcap_t * pcap_handle) {
|
||||
}
|
||||
}
|
||||
|
||||
/* *********************************************** */
|
||||
|
||||
/**
|
||||
* @brief End of detection and free flow
|
||||
@@ -1584,6 +1589,7 @@ static void terminateDetection(u_int16_t thread_id) {
|
||||
ndpi_workflow_free(ndpi_thread_info[thread_id].workflow);
|
||||
}
|
||||
|
||||
/* *********************************************** */
|
||||
|
||||
/**
|
||||
* @brief Traffic stats format
|
||||
@@ -1620,6 +1626,7 @@ char* formatTraffic(float numBits, int bits, char *buf) {
|
||||
return(buf);
|
||||
}
|
||||
|
||||
/* *********************************************** */
|
||||
|
||||
/**
|
||||
* @brief Packets stats format
|
||||
@@ -1638,6 +1645,7 @@ char* formatPackets(float numPkts, char *buf) {
|
||||
return(buf);
|
||||
}
|
||||
|
||||
/* *********************************************** */
|
||||
|
||||
/**
|
||||
* @brief JSON function init
|
||||
@@ -1649,6 +1657,8 @@ static void json_init() {
|
||||
jArray_topStats = json_object_new_array();
|
||||
}
|
||||
|
||||
/* *********************************************** */
|
||||
|
||||
static void json_open_stats_file() {
|
||||
if((file_first_time && ((stats_fp = fopen(_statsFilePath,"w")) == NULL))
|
||||
||
|
||||
@@ -1659,6 +1669,8 @@ static void json_open_stats_file() {
|
||||
else file_first_time = 0;
|
||||
}
|
||||
|
||||
/* *********************************************** */
|
||||
|
||||
static void json_close_stats_file() {
|
||||
json_object *jObjFinal = json_object_new_object();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user