[asterisk-bugs] [Asterisk 0012664]: [patch] MWI messages using MD message mutex and conditions

noreply at bugs.digium.com noreply at bugs.digium.com
Mon May 19 11:44:58 CDT 2008


The following issue has been RESOLVED. 
====================================================================== 
http://bugs.digium.com/view.php?id=12664 
====================================================================== 
Reported By:                tomo1657
Assigned To:                file
====================================================================== 
Project:                    Asterisk
Issue ID:                   12664
Category:                   Resources/res_smdi
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     resolved
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!): 116349 
Disclaimer on File?:        N/A 
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             05-15-2008 13:47 CDT
Last Modified:              05-19-2008 11:44 CDT
====================================================================== 
Summary:                    [patch] MWI messages using MD message mutex and
conditions
Description: 
There are mutex and condition vars for each SMDI message type: MD and MWI.
iface->md_q_lock
iface->md_q_cond
iface->mwi_q_lock
iface->mwi_q_cond

The function ast_cond_timedwait() is called from both functions
ast_smdi_md_message() and ast_smdi_mwi_message(), but it uses md_q_lock and
md_q_cond for both types of SMDI messages.

This results in lock.h failing to wait on the condition and mutex and
floods the console with warning messages whenever ast_smdi_mwi_message() is
called:

lock.h:648 __ast_cond_timedwait: res_smdi.c line 443
(smdi_message_wait): mutex '&iface->md_q_lock' freed more times than
we've locked!
lock.h:665 __ast_cond_timedwait: res_smdi.c line 443
(smdi_message_wait): Error waiting on condition mutex 'Operation not
permitted'

This would also mean that the MWI mutex is not being used.

The fix is to make sure ast_cond_timedwait() use the correct variables
when calling ast_cond_timedwait().
====================================================================== 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
05-19-08 11:44  svnbot         Status                   new => assigned     
05-19-08 11:44  svnbot         Assigned To               => file            
05-19-08 11:44  svnbot         Status                   assigned => resolved
05-19-08 11:44  svnbot         Resolution               open => fixed       
======================================================================




More information about the asterisk-bugs mailing list