[asterisk-commits] trunk r20484 - /trunk/channel.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sun Apr 16 07:14:17 MST 2006


Author: rizzo
Date: Sun Apr 16 09:14:16 2006
New Revision: 20484

URL: http://svn.digium.com/view/asterisk?rev=20484&view=rev
Log:
properly reindent a block


Modified:
    trunk/channel.c

Modified: trunk/channel.c
URL: http://svn.digium.com/view/asterisk/trunk/channel.c?rev=20484&r1=20483&r2=20484&view=diff
==============================================================================
--- trunk/channel.c (original)
+++ trunk/channel.c Sun Apr 16 09:14:16 2006
@@ -2346,45 +2346,44 @@
 		if (chan->tech->write == NULL)
 			break;
 
-			/* XXX need to reindent this block */
-			/* Bypass translator if we're writing format in the raw write format.  This
-			   allows mixing of native / non-native formats */
-			if (fr->subclass == chan->rawwriteformat)
-				f = fr;
-			else
-				f = (chan->writetrans) ? ast_translate(chan->writetrans, fr, 0) : fr;
-			if (f == NULL) {
-				res = 0;
-			} else {
-				if (chan->spies)
-					queue_frame_to_spies(chan, f, SPY_WRITE);
-
-				if (chan->monitor && chan->monitor->write_stream) {
+		/* Bypass translator if we're writing format in the raw write format.  This
+		   allows mixing of native / non-native formats */
+		if (fr->subclass == chan->rawwriteformat)
+			f = fr;
+		else
+			f = (chan->writetrans) ? ast_translate(chan->writetrans, fr, 0) : fr;
+		if (f == NULL) {
+			res = 0;
+		} else {
+			if (chan->spies)
+				queue_frame_to_spies(chan, f, SPY_WRITE);
+
+			if (chan->monitor && chan->monitor->write_stream) {
 #ifndef MONITOR_CONSTANT_DELAY
-					int jump = chan->insmpl - chan->outsmpl - 4 * f->samples;
-					if (jump >= 0) {
-						if (ast_seekstream(chan->monitor->write_stream, jump + f->samples, SEEK_FORCECUR) == -1)
-							ast_log(LOG_WARNING, "Failed to perform seek in monitoring write stream, synchronization between the files may be broken\n");
-						chan->outsmpl += jump + 4 * f->samples;
-					} else
-						chan->outsmpl += f->samples;
+				int jump = chan->insmpl - chan->outsmpl - 4 * f->samples;
+				if (jump >= 0) {
+					if (ast_seekstream(chan->monitor->write_stream, jump + f->samples, SEEK_FORCECUR) == -1)
+						ast_log(LOG_WARNING, "Failed to perform seek in monitoring write stream, synchronization between the files may be broken\n");
+					chan->outsmpl += jump + 4 * f->samples;
+				} else
+					chan->outsmpl += f->samples;
 #else
-					int jump = chan->insmpl - chan->outsmpl;
-					if (jump - MONITOR_DELAY >= 0) {
-						if (ast_seekstream(chan->monitor->write_stream, jump - f->samples, SEEK_FORCECUR) == -1)
-							ast_log(LOG_WARNING, "Failed to perform seek in monitoring write stream, synchronization between the files may be broken\n");
-						chan->outsmpl += jump;
-					} else
-						chan->outsmpl += f->samples;
+				int jump = chan->insmpl - chan->outsmpl;
+				if (jump - MONITOR_DELAY >= 0) {
+					if (ast_seekstream(chan->monitor->write_stream, jump - f->samples, SEEK_FORCECUR) == -1)
+						ast_log(LOG_WARNING, "Failed to perform seek in monitoring write stream, synchronization between the files may be broken\n");
+					chan->outsmpl += jump;
+				} else
+					chan->outsmpl += f->samples;
 #endif
-					if (chan->monitor->state == AST_MONITOR_RUNNING) {
-						if (ast_writestream(chan->monitor->write_stream, f) < 0)
-							ast_log(LOG_WARNING, "Failed to write data to channel monitor write stream\n");
-					}
+				if (chan->monitor->state == AST_MONITOR_RUNNING) {
+					if (ast_writestream(chan->monitor->write_stream, f) < 0)
+						ast_log(LOG_WARNING, "Failed to write data to channel monitor write stream\n");
 				}
-
-				res = chan->tech->write(chan, f);
 			}
+
+			res = chan->tech->write(chan, f);
+		}
 		break;	
 	}
 



More information about the asterisk-commits mailing list