[Asterisk-cvs] asterisk/apps app_agi.c,1.26.2.1,1.26.2.2

citats at lists.digium.com citats at lists.digium.com
Wed Mar 10 16:24:49 CST 2004


Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv21292/apps

Modified Files:
      Tag: v1-0_stable
	app_agi.c 
Log Message:
Free dsp in agi record file if it exits before the end (bug 1199)



Index: app_agi.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_agi.c,v
retrieving revision 1.26.2.1
retrieving revision 1.26.2.2
diff -u -d -r1.26.2.1 -r1.26.2.2
--- app_agi.c	5 Mar 2004 14:24:10 -0000	1.26.2.1
+++ app_agi.c	10 Mar 2004 21:17:39 -0000	1.26.2.2
@@ -529,6 +529,8 @@
 		if (!fs) {
 			res = -1;
 			fdprintf(agi->fd, "200 result=%d (writefile)\n", res);
+			if (sildet)
+				ast_dsp_free(sildet);
 			return RESULT_FAILURE;
 		}
 		
@@ -545,12 +547,16 @@
 			if (res < 0) {
 				ast_closestream(fs);
 				fdprintf(agi->fd, "200 result=%d (waitfor) endpos=%ld\n", res,sample_offset);
+				if (sildet)
+					ast_dsp_free(sildet);
 				return RESULT_FAILURE;
 			}
 			f = ast_read(chan);
 			if (!f) {
 				fdprintf(agi->fd, "200 result=%d (hangup) endpos=%ld\n", 0, sample_offset);
 				ast_closestream(fs);
+				if (sildet)
+					ast_dsp_free(sildet);
 				return RESULT_FAILURE;
 			}
 			switch(f->frametype) {
@@ -561,6 +567,8 @@
 					fdprintf(agi->fd, "200 result=%d (dtmf) endpos=%ld\n", f->subclass, sample_offset);
 					ast_closestream(fs);
 					ast_frfree(f);
+					if (sildet)
+						ast_dsp_free(sildet);
 					return RESULT_SUCCESS;
 				}
 				break;




More information about the svn-commits mailing list