Summary:ASTERISK-10646: Followme does not delete temporary voice files
Reporter:David Van Ginneken (davevg)Labels:
Date Opened:2007-10-30 08:15:26Date Closed:2007-10-30 09:30:36
Versions:Frequency of
Environment:Attachments:( 0) followme.diff
( 1) followme-v2.diff
( 2) followme-v3.diff
Description:FollowMe does not delete the temporary voice files in the /var/spool/asterisk/ directory when the application finishes. The variable it is unlinking does not have the file extension.  

Also moved the unlink code
to be after the outrun label so that we also delete files for callers that disconnect prior to being bridged.  

For example, if you call the followme application, have it record your name, then immediately hangup, the file would not be removed.

Patch Attached
Comments:By: BJ Weschke (bweschke) 2007-10-30 08:20:05

looks ok except for ast_module_user_remove should be the last thing you are doing in outrun.

By: David Van Ginneken (davevg) 2007-10-30 08:23:20

Changed patch to move the unlink code above ast_module_user_remove.

By: BJ Weschke (bweschke) 2007-10-30 08:32:51

What are you doing to protect yourself from buffer overflow of what you are strcat'ing into? Maybe better to define a char * ptr at the top of the method that sponsors the outrun label and then alloca exactly the size string you need and then use sprintf to build what you need.


* Declaration of functions and variables

- Do not declare variables mid-block (e.g. like recent GNU compilers support)
 since it is harder to read and not portable to GCC 2.95 and others.

By: David Van Ginneken (davevg) 2007-10-30 08:52:17

New patch submitted

By: Digium Subversion (svnbot) 2007-10-30 09:30:36

Repository: asterisk
Revision: 87514

U   branches/1.4/apps/app_followme.c

r87514 | bweschke | 2007-10-30 09:30:35 -0500 (Tue, 30 Oct 2007) | 6 lines

Fix issue where the recorded name wasn't getting removed correctly.
(closes issue ASTERISK-10646)
Reported by: davevg