[Asterisk-bugs] [Asterisk 0010053]: NULL voicemail state terminates Asterisk

noreply at bugs.diguim.com noreply at bugs.diguim.com
Fri Jun 29 15:18:09 CDT 2007


email_notification_title_for_action_bugnote_submitted 
====================================================================== 
http://bugs.digium.com/view.php?id=10053 
====================================================================== 
Reported By:                jaroth
Assigned To:                putnopvut
====================================================================== 
Project:                    Asterisk
Issue ID:                   10053
Category:                   Applications/app_voicemail
Reproducibility:            random
Severity:                   minor
Priority:                   normal
Status:                     feedback
Asterisk Version:            SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 71577 
Disclaimer on File?:        Yes 
Request Review:              
====================================================================== 
Date Submitted:             06-25-2007 10:00 CDT
Last Modified:              06-29-2007 15:18 CDT
====================================================================== 
Summary:                    NULL voicemail state terminates Asterisk
Description: 
If the pointer to vms (vm_state) is NULL (which should not be the case but
it has happened twice in our installation), Asterisk terminates during the
quota check using IMAP storage.
====================================================================== 

---------------------------------------------------------------------- 
 putnopvut - 06-29-07 15:18  
---------------------------------------------------------------------- 
After some further investigation in the code, I found another cause for the
crash you're seeing. Someone made a logic error in get_vm_state_by_imapuser
when changing the code to use Asterisk's linked list macros. The mistake he
made was that he forgot to actually put any sort of comparison between the
imapuser passed in and the imapuser of the current vm_state.

As such, the get_vm_state_by_imapuser calls in inboxcount could succeed
even though that particular imapuser does NOT have a vm_state in the
vmstates list. On success, no vm_state is inserted into the list. When
control returns to leave_voicemail, it tries to call
get_vm_state_by_mailbox and can't find a vm_state but since there isn't
one, vms remains NULL.

I committed a fix to trunk (revision 72670) which corrects the logical
error in get_vm_state_by_imapuser.

This fix, however, does not eliminate the first situation for which I said
vms could be null, so my patch I've uploaded still seems to be the answer
for that. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
06-25-07 10:00  jaroth         New Issue                                    
06-25-07 10:00  jaroth         Issue Monitored: jaroth                      
06-25-07 10:00  jaroth         File Added: quota.patch                      
06-25-07 10:00  jaroth         Asterisk Version          =>  SVN            
06-25-07 10:00  jaroth         SVN Branch (only for SVN checkou =>  trunk       
  
06-25-07 10:00  jaroth         SVN Revision (number only!) => 71577           
06-25-07 10:00  jaroth         Disclaimer on File?       => Yes             
06-25-07 10:18  qwell          Status                   new => assigned     
06-25-07 10:18  qwell          Assigned To               => putnopvut       
06-25-07 10:18  qwell          Note Added: 0065645                          
06-25-07 10:21  jaroth         Note Added: 0065646                          
06-25-07 11:39  putnopvut      Note Added: 0065652                          
06-25-07 11:55  jaroth         Note Added: 0065653                          
06-25-07 17:16  putnopvut      Note Added: 0065680                          
06-25-07 17:16  putnopvut      File Added: 10053.patch                      
06-25-07 17:27  putnopvut      Status                   assigned => feedback
06-25-07 18:09  putnopvut      File Deleted: 10053.patch                    
06-25-07 18:14  putnopvut      Note Edited: 0065680                         
06-25-07 18:18  putnopvut      File Added: 10053.patch                      
06-25-07 18:20  putnopvut      Note Edited: 0065680                         
06-26-07 11:20  jaroth         Note Added: 0065716                          
06-26-07 11:39  putnopvut      Note Added: 0065718                          
06-26-07 12:05  jaroth         Note Added: 0065719                          
06-26-07 15:23  jaroth         Note Added: 0065735                          
06-27-07 08:47  jaroth         Note Added: 0065757                          
06-27-07 09:39  putnopvut      Note Added: 0065759                          
======================================================================




More information about the Asterisk-bugs mailing list