From b36e1c34c633d94ebef7becb9cad01aeddd148ca Mon Sep 17 00:00:00 2001 From: Mark Michelson Date: Tue, 14 Feb 2012 16:27:30 +0000 Subject: [PATCH] Properly invert the return of a strncmp call. This was causing identification that should have been made private to be public. (closes issue AST-814) reported by Patrick Anderson Patches: chan_sip.c.diff uploaded by Patrick Anderson (license 5430) ........ Merged revisions 355268 from http://svn.asterisk.org/svn/asterisk/branches/1.8 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@355271 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_sip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 09a1e90870..95b9e8ff7d 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -15443,7 +15443,7 @@ static int get_pai(struct sip_pvt *p, struct sip_request *req) } ast_copy_string(privacy, sip_get_header(req, "Privacy"), sizeof(privacy)); - if (!ast_strlen_zero(privacy) && strncmp(privacy, "id", 2)) { + if (!ast_strlen_zero(privacy) && !strncmp(privacy, "id", 2)) { callingpres = AST_PRES_PROHIB_USER_NUMBER_NOT_SCREENED; } if (!cid_name) { -- 2.47.2