@@ -35,7 +35,7 @@ ZMQParserInterface::ZMQParserInterface(const char *endpoint,
3535 const char *custom_interface_type)
3636 : ParserInterface(endpoint, custom_interface_type) {
3737 if (trace_new_delete) ntop->getTrace ()->traceEvent (TRACE_NORMAL, " [new] %s" , __FILE__);
38-
38+ next_msg_time = 0 ;
3939 memset (&cumulative_remote_stats, 0 , sizeof (cumulative_remote_stats));
4040 memset (&last_cumulative_remote_stats_update, 0 , sizeof (last_cumulative_remote_stats_update));
4141
@@ -556,12 +556,18 @@ u_int8_t ZMQParserInterface::parseEvent(const char *payload, int payload_size,
556556 if (check_clock_drift /* Skip message with drops to avoid miscalculations */
557557 && ((zrs.local_time - polling_start_time) > 5 )) {
558558 if (abs (time_delta) >= 10 ) {
559- ntop->getTrace ()->traceEvent (TRACE_NORMAL,
560- " Remote probe clock drift %u sec "
561- " detected (local: %u remote: %u [%s])" ,
562- abs (time_delta), zrs.local_time ,
563- zrs.remote_time ,
564- zrs.remote_probe_address );
559+ u_int32_t now = (u_int32_t )time (NULL );
560+
561+ if (next_msg_time < now) {
562+ next_msg_time = now + 10 /* silence alaert fo 10+ sec */ ;
563+
564+ ntop->getTrace ()->traceEvent (TRACE_NORMAL,
565+ " Remote probe clock drift %u sec "
566+ " detected (local: %u remote: %u [%s])" ,
567+ abs (time_delta), zrs.local_time ,
568+ zrs.remote_time ,
569+ zrs.remote_probe_address );
570+ }
565571 }
566572 } else
567573 zrs.remote_time = zrs.local_time ; /* Avoid clock drift messages during
0 commit comments