[asterisk-commits] res rtp asterisk: Use PJ ICE MAX CAND instead of hard-coding 16 (asterisk[14])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Feb 15 17:35:00 CST 2017


Anonymous Coward #1000019 has submitted this change and it was merged. ( https://gerrit.asterisk.org/4955 )

Change subject: res_rtp_asterisk: Use PJ_ICE_MAX_CAND instead of hard-coding 16
......................................................................


res_rtp_asterisk: Use PJ_ICE_MAX_CAND instead of hard-coding 16

pjsip limits the total number of ICE candidates to PJ_ICE_MAX_CAND,
which is a compile-time constant. Instead of hard-coding 16 when we
enumerate local interfaces, use PJ_ICE_MAX_CAND so that we can
potentially collect more interfaces if the compile time options are
changed.

Tangentially related to ASTERISK~24464

Change-Id: I1b85509e39e33b1fed63c86261fc229ba14bbabd
---
M res/res_rtp_asterisk.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Mark Michelson: Looks good to me, but someone else must approve
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, approved



diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index 2f7a1e3..53e07df 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -2481,7 +2481,7 @@
 static void rtp_add_candidates_to_ice(struct ast_rtp_instance *instance, struct ast_rtp *rtp, struct ast_sockaddr *addr, int port, int component,
 				      int transport)
 {
-	pj_sockaddr address[16];
+	pj_sockaddr address[PJ_ICE_MAX_CAND];
 	unsigned int count = PJ_ARRAY_SIZE(address), pos = 0;
 	int basepos = -1;
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1b85509e39e33b1fed63c86261fc229ba14bbabd
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>



More information about the asterisk-commits mailing list