[asterisk-commits] rizzo: trunk r47770 - /trunk/channels/chan_oss.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Nov 16 15:03:28 MST 2006


Author: rizzo
Date: Thu Nov 16 16:03:27 2006
New Revision: 47770

URL: http://svn.digium.com/view/asterisk?view=rev&rev=47770
Log:
fix indentation


Modified:
    trunk/channels/chan_oss.c

Modified: trunk/channels/chan_oss.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_oss.c?view=diff&rev=47770&r1=47769&r2=47770
==============================================================================
--- trunk/channels/chan_oss.c (original)
+++ trunk/channels/chan_oss.c Thu Nov 16 16:03:27 2006
@@ -696,22 +696,24 @@
 		return -1;
 	}
 	switch (mode) {
-		case O_RDWR:
-			res = ioctl(fd, SNDCTL_DSP_SETDUPLEX, 0);
-			/* Check to see if duplex set (FreeBSD Bug) */
-			res = ioctl(fd, SNDCTL_DSP_GETCAPS, &fmt);
-			if (res == 0 && (fmt & DSP_CAP_DUPLEX)) {
-				if (option_verbose > 1)
-					ast_verbose(VERBOSE_PREFIX_2 "Console is full duplex\n");
-				o->duplex = M_FULL;
-			};
-			break;
-		case O_WRONLY:
-			o->duplex = M_WRITE;
-			break;
-		case O_RDONLY:
-			o->duplex = M_READ;
-			break;
+	case O_RDWR:
+		res = ioctl(fd, SNDCTL_DSP_SETDUPLEX, 0);
+		/* Check to see if duplex set (FreeBSD Bug) */
+		res = ioctl(fd, SNDCTL_DSP_GETCAPS, &fmt);
+		if (res == 0 && (fmt & DSP_CAP_DUPLEX)) {
+			if (option_verbose > 1)
+				ast_verbose(VERBOSE_PREFIX_2 "Console is full duplex\n");
+			o->duplex = M_FULL;
+		};
+		break;
+
+	case O_WRONLY:
+		o->duplex = M_WRITE;
+		break;
+
+	case O_RDONLY:
+		o->duplex = M_READ;
+		break;
 	}
 
 	fmt = 0;
@@ -949,32 +951,34 @@
 	int res = -1;
 
 	switch (cond) {
-		case AST_CONTROL_BUSY:
-		case AST_CONTROL_CONGESTION:
-		case AST_CONTROL_RINGING:
-			res = cond;
-			break;
-
-		case -1:
-			o->cursound = -1;
-			o->nosound = 0;		/* when cursound is -1 nosound must be 0 */
-			return 0;
-
-		case AST_CONTROL_VIDUPDATE:
-			res = -1;
-			break;
-		case AST_CONTROL_HOLD:
-			ast_verbose(" << Console Has Been Placed on Hold >> \n");
-			ast_moh_start(c, data, o->mohinterpret);
-			break;
-		case AST_CONTROL_UNHOLD:
-			ast_verbose(" << Console Has Been Retrieved from Hold >> \n");
-			ast_moh_stop(c);
-			break;
-
-		default:
-			ast_log(LOG_WARNING, "Don't know how to display condition %d on %s\n", cond, c->name);
-			return -1;
+	case AST_CONTROL_BUSY:
+	case AST_CONTROL_CONGESTION:
+	case AST_CONTROL_RINGING:
+		res = cond;
+		break;
+
+	case -1:
+		o->cursound = -1;
+		o->nosound = 0;		/* when cursound is -1 nosound must be 0 */
+		return 0;
+
+	case AST_CONTROL_VIDUPDATE:
+		res = -1;
+		break;
+
+	case AST_CONTROL_HOLD:
+		ast_verbose(" << Console Has Been Placed on Hold >> \n");
+		ast_moh_start(c, data, o->mohinterpret);
+		break;
+
+	case AST_CONTROL_UNHOLD:
+		ast_verbose(" << Console Has Been Retrieved from Hold >> \n");
+		ast_moh_stop(c);
+		break;
+
+	default:
+		ast_log(LOG_WARNING, "Don't know how to display condition %d on %s\n", cond, c->name);
+		return -1;
 	}
 
 	if (res > -1)



More information about the asterisk-commits mailing list