[Asterisk-code-review] pjsip configuration.c: Ignore repeated identify by methods. (asterisk[14])

Richard Mudgett asteriskteam at digium.com
Fri Sep 2 13:21:07 CDT 2016


Richard Mudgett has uploaded a new change for review.

  https://gerrit.asterisk.org/3805

Change subject: pjsip_configuration.c: Ignore repeated identify by methods.
......................................................................

pjsip_configuration.c: Ignore repeated identify by methods.

Change-Id: Ied0c06043d1dfef8fdc9c9a808cf89b118119838
---
M res/res_pjsip/pjsip_configuration.c
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/05/3805/1

diff --git a/res/res_pjsip/pjsip_configuration.c b/res/res_pjsip/pjsip_configuration.c
index 333be71..d8ae9e0 100644
--- a/res/res_pjsip/pjsip_configuration.c
+++ b/res/res_pjsip/pjsip_configuration.c
@@ -603,6 +603,10 @@
 			endpoint->ident_method = 0;
 			return -1;
 		}
+		if (endpoint->ident_method & method) {
+			/* We are already indentifying by this method.  No need to do it again. */
+			continue;
+		}
 
 		endpoint->ident_method |= method;
 		AST_VECTOR_APPEND(&endpoint->ident_method_order, method);

-- 
To view, visit https://gerrit.asterisk.org/3805
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ied0c06043d1dfef8fdc9c9a808cf89b118119838
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>



More information about the asterisk-code-review mailing list