]> git.ipfire.org Git - thirdparty/asterisk.git/commit
voicemail: get real last_message_index and count_messages, ODBC resequence
authorAlec L Davis <sivad.a@paradise.net.nz>
Fri, 1 Apr 2011 08:29:49 +0000 (08:29 +0000)
committerAlec L Davis <sivad.a@paradise.net.nz>
Fri, 1 Apr 2011 08:29:49 +0000 (08:29 +0000)
commit4de07be466da4551b7125bf67eee35a44a79b73d
tree766eabc727e74187d053ad5124d3d32e27233038
parent752c3ef59108932a8bec33af9504fb2b6fd93cfd
voicemail: get real last_message_index and count_messages, ODBC resequence

change last_message_index to read the max msgnum stored in the database
change count_messages to actually count the number of messages.

last_message_index change:
  This fixed overwriting of the last message if msgnum=0 was missing.
  Previously every incoming message would overwrite msgnum=1.
count_messages change:
  allows us to detect when requencing is required in opneA_mailbox.
resequence enabled for ODBC storage:
  Assists with fixing up corrupt databases with gaps, but only when
  a user actively opens there mailboxes.

(closes issue #18692,#18582,#19032)
Reported by: elguero
Patches:
      based on odbc_resequence_mailbox2.1.diff uploaded by elguero (license 37)
Tested by: elguero, nivek, alecdavis

Review: https://reviewboard.asterisk.org/r/1153/

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