From: Mark Michelson Date: Tue, 14 Feb 2012 16:26:49 +0000 (+0000) Subject: Properly invert the return of a strncmp call. X-Git-Tag: 1.8.11.0-rc1~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5d76e1c110e45c59c4a1e367ed91f4ab75f99b4;p=thirdparty%2Fasterisk.git 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) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@355268 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 4b6122023e..2a49d53370 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -15041,7 +15041,7 @@ static int get_pai(struct sip_pvt *p, struct sip_request *req) } ast_copy_string(privacy, 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) {