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

noreply at bugs.digium.com noreply at bugs.digium.com
Mon Jan 14 16:11:21 CST 2008


The following issue has been RESOLVED. 
====================================================================== 
http://bugs.digium.com/view.php?id=11744 
====================================================================== 
Reported By:                dimas
Assigned To:                putnopvut
====================================================================== 
Project:                    Asterisk
Issue ID:                   11744
Category:                   Applications/app_directory
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     resolved
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:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             01-11-2008 14:06 CST
Last Modified:              01-14-2008 16:11 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.
====================================================================== 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
01-14-08 16:11  putnopvut      Status                   assigned => resolved
======================================================================




More information about the asterisk-bugs mailing list