[svn-commits] seanbright: trunk r212764 - in /trunk: ./ main/manager.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Tue Aug 18 11:38:41 CDT 2009
Author: seanbright
Date: Tue Aug 18 11:38:36 2009
New Revision: 212764
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=212764
Log:
Merged revisions 212763 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r212763 | seanbright | 2009-08-18 12:36:00 -0400 (Tue, 18 Aug 2009) | 11 lines
Delay the creation of temporary files until we have a valid manager command to handle.
Without this patch, asterisk creates a temporary file before determining if the
specified command is valid. If invalid, we weren't properly cleaning up the file.
(closes issue #15730)
Reported by: zmehmood
Patches:
M15730.diff uploaded by junky (license 177)
Tested by: zmehmood
........
Modified:
trunk/ (props changed)
trunk/main/manager.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/main/manager.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/main/manager.c?view=diff&rev=212764&r1=212763&r2=212764
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Tue Aug 18 11:38:36 2009
@@ -3126,7 +3126,7 @@
const char *id = astman_get_header(m, "ActionID");
char *buf, *final_buf;
char template[] = "/tmp/ast-ami-XXXXXX"; /* template for temporary file */
- int fd = mkstemp(template);
+ int fd;
off_t l;
if (ast_strlen_zero(cmd)) {
@@ -3138,6 +3138,8 @@
astman_send_error(s, m, "Command blacklisted");
return 0;
}
+
+ fd = mkstemp(template);
astman_append(s, "Response: Follows\r\nPrivilege: Command\r\n");
if (!ast_strlen_zero(id)) {
More information about the svn-commits
mailing list