]> git.ipfire.org Git - thirdparty/asterisk.git/commit
app_voicemail.c: Completely resequence mailbox folders.
authorSean Bright <sean@seanbright.com>
Mon, 27 Nov 2023 15:20:02 +0000 (10:20 -0500)
committerAsterisk Development Team <asteriskteam@digium.com>
Fri, 12 Jan 2024 18:21:33 +0000 (18:21 +0000)
commit5288c25dc141201d53e39bb671f3f26e5631e8f0
tree1d028bf574182c28581b5bb9a8d91553e43aaf57
parent212befbcf102908159cda63b049bfb0a6e9543fa
app_voicemail.c: Completely resequence mailbox folders.

Resequencing is a process that occurs when we open a voicemail folder
and discover that there are gaps between messages (e.g. `msg0000.txt`
is missing but `msg0001.txt` exists). Resequencing involves shifting
the existing messages down so we end up with a sequential list of
messages.

Currently, this process stops after reaching a threshold based on the
message limit (`maxmsg`) configured on the current folder. However, if
`maxmsg` is lowered when a voicemail folder contains more than
`maxmsg + 10` messages, resequencing will not run completely leaving
the mailbox in an inconsistent state.

We now resequence up to the maximum number of messages permitted by
`app_voicemail` (currently hard-coded at 9999 messages).

Fixes #86

(cherry picked from commit 242a0685b12dd3783676994e3ac9d7f5d90e3401)
apps/app_voicemail.c