[Asterisk-code-review] chan_dahdi: Don't append cadences on dahdi restart. (asterisk[master])

N A asteriskteam at digium.com
Sun Mar 27 07:43:38 CDT 2022


Hello Friendly Automation, 

I'd like you to reexamine a change. Please visit

    https://gerrit.asterisk.org/c/asterisk/+/18301

to look at the new patch set (#2).

Change subject: chan_dahdi: Don't append cadences on dahdi restart.
......................................................................

chan_dahdi: Don't append cadences on dahdi restart.

Currently, if any custom ring cadences are specified, they are
appending to the array of cadences from wherever we left off
last time. This works properly the first time, but on subsequent
dahdi restarts, it means that the existing cadences are left
alone and (most likely) the same cadences are then re-added
afterwards. In short order, the cadence array gets maxed out
and the user begins seeing warnings that the array is full
and no more cadences may be added.

This buggy behavior persists until Asterisk is completely
restarted; however, if and when dahdi restart is run again,
then the same problem is reintroduced.

This fixes this behavior so that cadence parsing is more
idempotent, that is so running dahdi restart multiple times
starts adding cadences from the beginning, rather than from
wherever the last cadence was added.

As before, it is still not possible to revert to the default
cadences by simply removing all cadences in this manner, nor
is it possible to delete existing cadences. However, this
does make it possible to update existing cadences, which
was not possible before, and also ensures that the cadences
remain unchanged if the config remains unchanged.

ASTERISK-29990 #close

Change-Id: Ie32ea3e8a243b766756b1afce684d4a31ee7421d
---
M channels/chan_dahdi.c
M configs/samples/chan_dahdi.conf.sample
2 files changed, 6 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/01/18301/2
-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/18301
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Ie32ea3e8a243b766756b1afce684d4a31ee7421d
Gerrit-Change-Number: 18301
Gerrit-PatchSet: 2
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-MessageType: newpatchset
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220327/9b59c5d4/attachment.html>


More information about the asterisk-code-review mailing list