浏览代码

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"
 #include "sipcapture.h"
 
 
 
 
-
+static int show_error = 0;
 static int count = 0;
 static int count = 0;
 
 
 struct hep_timehdr* heptime;
 struct hep_timehdr* heptime;
@@ -58,7 +58,10 @@ int hep_msg_received(void *data)
         struct receive_info *ri;
         struct receive_info *ri;
 
 
         if(!hep_capture_on) {
         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;
                 return -1;
         }
         }