소스 검색

added bool to print error once

Alexandr Dubovikov 10 년 전
부모
커밋
c836390575
1개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. 5 2
      modules/sipcapture/hep.c

+ 5 - 2
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;
         }