[asterisk-commits] trunk r27094 - in /trunk: ./ apps/app_voicemail.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon May 15 09:32:12 MST 2006
Author: tilghman
Date: Fri May 12 23:18:25 2006
New Revision: 27094
URL: http://svn.digium.com/view/asterisk?rev=27094&view=rev
Log:
Merged revisions 27093 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r27093 | tilghman | 2006-05-12 23:08:29 -0500 (Fri, 12 May 2006) | 2 lines
Bug 7134 - File descriptor leak with ODBC storage of voicemail
........
Modified:
trunk/ (props changed)
trunk/apps/app_voicemail.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.
Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?rev=27094&r1=27093&r2=27094&view=diff
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Fri May 12 23:18:25 2006
@@ -919,7 +919,7 @@
odbc_release_obj(obj);
goto yuck;
}
- fd = open(full_fn, O_RDWR | O_CREAT | O_TRUNC);
+ fd = open(full_fn, O_RDWR | O_CREAT | O_TRUNC, 0770);
if (fd < 0) {
ast_log(LOG_WARNING, "Failed to write '%s': %s\n", full_fn, strerror(errno));
SQLFreeHandle (SQL_HANDLE_STMT, stmt);
@@ -949,13 +949,13 @@
if (!strcasecmp(coltitle, "recording")) {
res = SQLGetData(stmt, x + 1, SQL_BINARY, NULL, 0, &colsize);
fdlen = colsize;
- fd = open(full_fn, O_RDWR | O_TRUNC | O_CREAT, 0770);
if (fd > -1) {
char tmp[1]="";
lseek(fd, fdlen - 1, SEEK_SET);
if (write(fd, tmp, 1) != 1) {
close(fd);
fd = -1;
+ continue;
}
if (fd > -1)
fdm = mmap(NULL, fdlen, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
More information about the asterisk-commits
mailing list