From: Naveen Albert Date: Wed, 30 Mar 2022 00:22:46 +0000 (+0000) Subject: chan_dahdi: Fix insufficient array size for round robin. X-Git-Tag: 18.12.0-rc1~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd15cd049f2623e725eee601df0ae20071e54af3;p=thirdparty%2Fasterisk.git 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 --- diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index ad7a8e5e54..d1363f9a74 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -3410,7 +3410,7 @@ struct analog_callback analog_callbacks = }; /*! 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) {