From 9ee13167bb2338545efd8a468bcfe726daa6aa14 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Mon, 21 Nov 2005 02:03:23 +0000 Subject: [PATCH] issue #5787 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7163 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- ChangeLog | 4 ++++ Makefile | 1 + apps/app_record.c | 8 ++++---- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index d5c00725a6..43ac0fedf7 100755 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2005-11-20 Russell Bryant + * apps/app_record.c: Don't leak a frame if writing it to the file fails. (issue #5787) + + * Makefile: Create the monitor spool directory when the other spool directories are created. + * channels/chan_sip.c channels/chan_iax2.c: Change warning messages about the number of scheduled events happening all at once to debug messages. (issue #5794) * pbx/pbx_spool.c: Fix crash when a value is not specified with a variable on a Set: line in a call file. (issue #5806) diff --git a/Makefile b/Makefile index a2ce5c4bda..815644f812 100755 --- a/Makefile +++ b/Makefile @@ -636,6 +636,7 @@ bininstall: all mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/system mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/tmp mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/meetme + mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/monitor if [ -f asterisk ]; then $(INSTALL) -m 755 asterisk $(DESTDIR)$(ASTSBINDIR)/; fi if [ -f cygwin/asterisk.exe ]; then $(INSTALL) -m 755 cygwin/asterisk.exe $(DESTDIR)$(ASTSBINDIR)/; fi if [ -f asterisk.dll ]; then $(INSTALL) -m 755 asterisk.dll $(DESTDIR)$(ASTSBINDIR)/; fi diff --git a/apps/app_record.c b/apps/app_record.c index 7c50a1d731..85310ea708 100755 --- a/apps/app_record.c +++ b/apps/app_record.c @@ -277,6 +277,7 @@ static int record_exec(struct ast_channel *chan, void *data) if (res) { ast_log(LOG_WARNING, "Problem writing frame\n"); + ast_frfree(f); break; } @@ -295,16 +296,15 @@ static int record_exec(struct ast_channel *chan, void *data) break; } } - } - if (f->frametype == AST_FRAME_VIDEO) { + } else if (f->frametype == AST_FRAME_VIDEO) { res = ast_writestream(s, f); if (res) { ast_log(LOG_WARNING, "Problem writing frame\n"); + ast_frfree(f); break; } - } - if ((f->frametype == AST_FRAME_DTMF) && + } else if ((f->frametype == AST_FRAME_DTMF) && (f->subclass == terminator)) { ast_frfree(f); break;