From c8363905755e5d120251eed95c5fa1be45e8f216 Mon Sep 17 00:00:00 2001 From: Alexandr Dubovikov Date: Sat, 17 Jan 2015 20:34:35 +0100 Subject: [PATCH] added bool to print error once --- modules/sipcapture/hep.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/sipcapture/hep.c b/modules/sipcapture/hep.c index c1ff51c3549..a14fcd9f7dd 100644 --- a/modules/sipcapture/hep.c +++ b/modules/sipcapture/hep.c @@ -37,7 +37,7 @@ #include "sipcapture.h" - +static int show_error = 0; static int count = 0; struct hep_timehdr* heptime; @@ -58,7 +58,10 @@ int hep_msg_received(void *data) struct receive_info *ri; if(!hep_capture_on) { - LOG(L_ERR, "sipcapture:hep_msg_received HEP is not enabled\n"); + if(show_error == 0) { + LOG(L_ERR, "sipcapture:hep_msg_received HEP is not enabled\n"); + show_error = 1; + } return -1; }