[asterisk-bugs] [Asterisk 0011744]: [patch] multiple bugs in Directory application

noreply at bugs.digium.com noreply at bugs.digium.com
Sun Jan 13 05:59:03 CST 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=11744 
====================================================================== 
Reported By:                dimas
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   11744
Category:                   Applications/app_directory
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 94802 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             01-11-2008 14:06 CST
Last Modified:              01-13-2008 05:59 CST
====================================================================== 
Summary:                    [patch] multiple bugs in Directory application
Description: 
app_directory contained some duplicate code even before addition of 'm'
option. Addition of that option doubled amount of that code. Worst of all,
there are minor differences between these code block and bugs caused by
these differences.

1. There is a memory leak. In the 'menu' mode, result of the convert(pos)
function is not freed while it should be.
2. In the 'menu' mode check for OPT_LISTBYFIRSTNAME flag ('f' option) is
not negated as result, application works in the mode opposite to what user
expect (checking last name when user wants the first nd vice versa).
3. select_item function plays message for user using res = func1() ||
func2() || func3()... construct. This construct loses the actual value
returned by ast_waitstream() for example so at the end, res does not
contain digit user dialed while listening to the message.
4. (also in 1.4) application announces entries from
voicemail.conf/realtime separately from entries from users.conf. I see no
reason why doing so instead of building combined list.
5. Alot of duplicated code as already mentioned.

Attached patch does major refactoring of app_directory and I hope it fixes
all the issues above.
====================================================================== 

---------------------------------------------------------------------- 
 dimas - 01-13-08 05:59  
---------------------------------------------------------------------- 
Updated the patch - fixed compiler warning. (This also fixes couple of
bugs) 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
01-13-08 05:59  dimas          Note Added: 0076844                          
======================================================================




More information about the asterisk-bugs mailing list