[Asterisk-code-review] chan_dahdi: Fix insufficient array size for round robin. (asterisk[16])

Joshua Colp asteriskteam at digium.com
Wed Apr 27 11:39:00 CDT 2022


Joshua Colp has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/18467 )

Change subject: chan_dahdi: Fix insufficient array size for round robin.
......................................................................

chan_dahdi: Fix insufficient array size for round robin.

According to chan_dahdi.conf, up to 64 groups (numbered
0 through 63) can be used when dialing DAHDI channels.

However, currently dialing round robin with a group number
greater than 31 fails because the array for the round robin
structure is only size 32, instead of 64 as it should be.

This fixes that so the round robin array size is consistent
with the actual groups capacity.

ASTERISK-29994

Change-Id: I4caa08d7025f78ac75a0539f71aaf3eb3e85b3b7
---
M channels/chan_dahdi.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve; Approved for Submit
  Benjamin Keith Ford: Looks good to me, approved



diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index e5f0926..c834112 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -3410,7 +3410,7 @@
 };
 
 /*! Round robin search locations. */
-static struct dahdi_pvt *round_robin[32];
+static struct dahdi_pvt *round_robin[64]; /* groups can range from 0-63 */
 
 int _dahdi_get_index(struct ast_channel *ast, struct dahdi_pvt *p, int nullok, const char *fname, unsigned long line)
 {

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/18467
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I4caa08d7025f78ac75a0539f71aaf3eb3e85b3b7
Gerrit-Change-Number: 18467
Gerrit-PatchSet: 2
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220427/6f9f7f19/attachment.html>


More information about the asterisk-code-review mailing list