From ffc1dc331acc3f033bcdbfe46964db3d05f4c512 Mon Sep 17 00:00:00 2001
From: Olle Johansson <oej@edvina.net>
Date: Mon, 13 Nov 2006 16:08:12 +0000
Subject: [PATCH] Only produce error message once, don't fill the screen with
 them... (Testing SIPP thanks to JerJer and Greg)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47541 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 channels/chan_sip.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index cc97297a8b..5f3490809c 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -10753,12 +10753,16 @@ static void sip_dump_history(struct sip_pvt *dialog)
 {
 	int x = 0;
 	struct sip_history *hist;
+	static errmsg = 0;
 
 	if (!dialog)
 		return;
 
 	if (!option_debug && !sipdebug) {
-		ast_log(LOG_NOTICE, "You must have debugging enabled (SIP or Asterisk) in order to dump SIP history.\n");
+		if (!errmsg) {
+			ast_log(LOG_NOTICE, "You must have debugging enabled (SIP or Asterisk) in order to dump SIP history.\n");
+			errmsg = 1;
+		}
 		return;
 	}
 
-- 
GitLab