Fix some debug messages
This commit is contained in:
@@ -1117,7 +1117,8 @@ static void printFlow(u_int16_t id, struct ndpi_flow_info *flow, u_int16_t threa
|
||||
flowGetBDMeanandVariance(flow);
|
||||
}
|
||||
|
||||
fprintf(csv_fp, "\n");
|
||||
if(csv_fp)
|
||||
fprintf(csv_fp, "\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -491,7 +491,7 @@ static int ndpi_add_host_url_subprotocol(struct ndpi_detection_module_struct *nd
|
||||
if(!value) return(-1);
|
||||
|
||||
#ifdef DEBUG
|
||||
NDPI_LOG_DEBUG2(ndpi_str, "[NDPI] Adding [%s][%d]\n", value, protocol_id);
|
||||
NDPI_LOG_DBG2(ndpi_str, "[NDPI] Adding [%s][%d]\n", value, protocol_id);
|
||||
#endif
|
||||
|
||||
rv = ndpi_string_to_automa(ndpi_str,
|
||||
@@ -3030,7 +3030,7 @@ void ndpi_set_bitmask_protocol_detection(char * label,
|
||||
*/
|
||||
if(NDPI_COMPARE_PROTOCOL_TO_BITMASK(*detection_bitmask, ndpi_protocol_id) != 0) {
|
||||
#ifdef DEBUG
|
||||
NDPI_LOG_DBG2(ndpi_str
|
||||
NDPI_LOG_DBG2(ndpi_str,
|
||||
"[NDPI] ndpi_set_bitmask_protocol_detection: %s : [callback_buffer] idx= %u, [proto_defaults] protocol_id=%u\n",
|
||||
label, idx, ndpi_protocol_id);
|
||||
#endif
|
||||
|
||||
@@ -43,7 +43,7 @@ static int ndpi_ftp_control_check_request(struct ndpi_flow_struct *flow,
|
||||
const u_int8_t *payload,
|
||||
size_t payload_len) {
|
||||
#ifdef FTP_DEBUG
|
||||
printf("%s() [%s]\n", __FUNCTION__, payload);
|
||||
printf("%s() [%.*s]\n", __FUNCTION__, (int)payload_len, payload);
|
||||
#endif
|
||||
|
||||
if(ndpi_match_strprefix(payload, payload_len, "USER")) {
|
||||
@@ -550,7 +550,7 @@ static int ndpi_ftp_control_check_response(struct ndpi_flow_struct *flow,
|
||||
const u_int8_t *payload,
|
||||
size_t payload_len) {
|
||||
#ifdef FTP_DEBUG
|
||||
printf("%s() [%s]\n", __FUNCTION__, payload);
|
||||
printf("%s() [%.*s]\n", __FUNCTION__, (int)payload_len, payload);
|
||||
#endif
|
||||
|
||||
if(payload_len == 0) return(1);
|
||||
|
||||
@@ -125,7 +125,7 @@ void ndpi_search_mail_smtp_tcp(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
&& (packet->line[a].ptr[3] == 'H' || packet->line[a].ptr[3] == 'h')
|
||||
&& packet->line[a].ptr[4] == ' ') {
|
||||
#ifdef SMTP_DEBUG
|
||||
printf("%s() AUTH [%s]\n", __FUNCTION__, packet->line[a].ptr);
|
||||
printf("%s() AUTH [%.*s]\n", __FUNCTION__, packet->line[a].len, packet->line[a].ptr);
|
||||
#endif
|
||||
|
||||
flow->l4.tcp.smtp_command_bitmask |= SMTP_BIT_AUTH;
|
||||
@@ -133,7 +133,7 @@ void ndpi_search_mail_smtp_tcp(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
} else {
|
||||
if(packet->line[a].ptr[3] != ' ') {
|
||||
#ifdef SMTP_DEBUG
|
||||
printf("%s() => [%s]\n", __FUNCTION__, packet->line[a].ptr);
|
||||
printf("%s() => [%.*s]\n", __FUNCTION__, packet->line[a].len, packet->line[a].ptr);
|
||||
#endif
|
||||
|
||||
if(flow->protos.ftp_imap_pop_smtp.auth_found) {
|
||||
|
||||
Reference in New Issue
Block a user