[Asterisk-cvs] asterisk app.c,1.31,1.31.2.1

russell at lists.digium.com russell at lists.digium.com
Tue Oct 26 11:18:56 CDT 2004


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

Modified Files:
      Tag: v1-0
	app.c 
Log Message:
fix short message issue (bug #2723)


Index: app.c
===================================================================
RCS file: /usr/cvsroot/asterisk/app.c,v
retrieving revision 1.31
retrieving revision 1.31.2.1
diff -u -d -r1.31 -r1.31.2.1
--- app.c	23 Sep 2004 16:58:09 -0000	1.31
+++ app.c	26 Oct 2004 15:22:09 -0000	1.31.2.1
@@ -706,10 +706,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]);
 	}
@@ -718,14 +720,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