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

Richard Mudgett asteriskteam at digium.com
Fri Sep 2 13:20:50 CDT 2016


Richard Mudgett has uploaded a new change for review.

  https://gerrit.asterisk.org/3804

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/04/3804/1

diff --git a/res/res_pjsip/pjsip_configuration.c b/res/res_pjsip/pjsip_configuration.c
index e495054..478e5c7 100644
--- a/res/res_pjsip/pjsip_configuration.c
+++ b/res/res_pjsip/pjsip_configuration.c
@@ -606,6 +606,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/3804
To unsubscribe, visit https://gerrit.asterisk.org/settings

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



More information about the asterisk-code-review mailing list