]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Fix regression causing abort in voicemail after opening a mailbox with no mesgs.
authorJeff Peeler <jpeeler@digium.com>
Fri, 12 Nov 2010 20:49:09 +0000 (20:49 +0000)
committerJeff Peeler <jpeeler@digium.com>
Fri, 12 Nov 2010 20:49:09 +0000 (20:49 +0000)
commitfe1ca1a8da44772170e815b851f7ea57bd557c0a
tree62908f56d96412a725895c2a92410ac2b452225d
parent156f8c7d62a8a0cf8d3681defbb65b6a08eb7a8c
Fix regression causing abort in voicemail after opening a mailbox with no mesgs.

In order to be more safe, some error handling code was changed to respect more
error conditions including the potential memory allocation failure for deleted
and heard message tracking introduced in 293004. However, last_message_index
returns -1 for zero messages (perhaps as expected) and was triggering the
stricter error checking. Because last_message_index is only called directly
in one place, just return 0 from open_mailbox (for file based storage) when no
messages are detected unless a real error has occurred.

(closes issue #18240)
Reported by: leobrown
Patches:
      bug18240.1-6-2.diff.txt uploaded by alecdavis (license 585)
Tested by: pabelanger

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@294903 65c4cc65-6c06-0410-ace0-fbb531ad65f3
apps/app_voicemail.c