[Asterisk-cvs] asterisk app.c,1.33,1.34

markster at lists.digium.com markster at lists.digium.com
Mon Oct 25 22:18:13 CDT 2004


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

Modified Files:
	app.c 
Log Message:
Fix short message isssue (bug #2723)


Index: app.c
===================================================================
RCS file: /usr/cvsroot/asterisk/app.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- app.c	3 Oct 2004 21:18:26 -0000	1.33
+++ app.c	26 Oct 2004 02:21:43 -0000	1.34
@@ -710,10 +710,12 @@
 	for (x=0;x<fmtcnt;x++) {
 		if (!others[x])
 			break;
-		if (totalsilence)
-			ast_stream_rewind(others[x], totalsilence-200);
-		else
-			ast_stream_rewind(others[x], 200);
+		if (res > 0) {
+			if (totalsilence)
+				ast_stream_rewind(others[x], totalsilence-200);
+			else
+				ast_stream_rewind(others[x], 200);
+		}
 		ast_truncstream(others[x]);
 		ast_closestream(others[x]);
 	}
@@ -722,14 +724,11 @@
 			ast_log(LOG_WARNING, "Unable to restore format %s to channel '%s'\n", ast_getformatname(rfmt), chan->name);
 		}
 	}
-	if (outmsg) {
-		if (outmsg > 1) {
+	if (outmsg > 1) {
 		/* Let them know recording is stopped */
-			ast_streamfile(chan, "auth-thankyou", chan->language);
+		if(!ast_streamfile(chan, "auth-thankyou", chan->language))
 			ast_waitstream(chan, "");
-		}
 	}
-
 	return res;
 }
 




More information about the svn-commits mailing list