From e6fcca503bcb4cdb66c3bf4b6e1b6697a64eec9c Mon Sep 17 00:00:00 2001
From: Mark Spencer <markster@digium.com>
Date: Thu, 27 Mar 2003 00:15:05 +0000
Subject: [PATCH] Privacy updates, message waiting with new messages only

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@702 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 apps/app_privacy.c  | 2 +-
 channels/chan_sip.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/apps/app_privacy.c b/apps/app_privacy.c
index 9b5e0c9d6f..8db778e0be 100755
--- a/apps/app_privacy.c
+++ b/apps/app_privacy.c
@@ -83,7 +83,7 @@ privacy_exec (struct ast_channel *chan, void *data)
 		
 		
 		/*Play unidentified call*/
-		res = ast_safe_sleep(1);
+		res = ast_safe_sleep(chan, 1000);
 		if (!res)
 			res = ast_streamfile(chan, "privacy-unident", chan->language);
 		if (!res)
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index e26350a801..d7b73efdaa 100755
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -2035,7 +2035,7 @@ static int transmit_notify(struct sip_pvt *p, int newmsgs, int oldmsgs)
 	add_header(&req, "Event", "message-summary");
 	add_header(&req, "Content-Type", "application/simple-message-summary");
 
-	snprintf(tmp, sizeof(tmp), "Message-Waiting: %s\n", (newmsgs + oldmsgs) ? "yes" : "no");
+	snprintf(tmp, sizeof(tmp), "Message-Waiting: %s\n", newmsgs ? "yes" : "no");
 	snprintf(tmp2, sizeof(tmp2), "Voicemail: %d/%d\n", newmsgs, oldmsgs);
 	snprintf(clen, sizeof(clen), "%d", strlen(tmp) + strlen(tmp2));
 	add_header(&req, "Content-Length", clen);
-- 
GitLab