diff options
author | Sean Bright <sean.bright@gmail.com> | 2017-02-15 12:03:00 -0500 |
---|---|---|
committer | Sean Bright <sean.bright@gmail.com> | 2017-02-15 12:14:05 -0500 |
commit | 11886dea82b2d342c946f669144d5afaa667a26a (patch) | |
tree | 19434d37df4b3a14bd5f508a30d09e2ed83bb294 /res/res_rtp_asterisk.c | |
parent | 0b5a17082be78be17c5191d86f806936dcdc7d61 (diff) |
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
Diffstat (limited to 'res/res_rtp_asterisk.c')
-rw-r--r-- | res/res_rtp_asterisk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c index 3d124000a..5d7adcd43 100644 --- a/res/res_rtp_asterisk.c +++ b/res/res_rtp_asterisk.c @@ -2479,7 +2479,7 @@ static int rtp_address_is_ice_blacklisted(const pj_sockaddr_t *address) 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; |