[Asterisk-cvs] asterisk/channels chan_oss.c,1.30,1.31

markster at lists.digium.com markster at lists.digium.com
Wed Aug 11 23:33:21 CDT 2004


Update of /usr/cvsroot/asterisk/channels
In directory localhost.localdomain:/tmp/cvs-serv8176/channels

Modified Files:
	chan_oss.c 
Log Message:
Fix duplex code for FreeBSD


Index: chan_oss.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_oss.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- chan_oss.c	8 Aug 2004 17:15:02 -0000	1.30
+++ chan_oss.c	12 Aug 2004 03:19:19 -0000	1.31
@@ -329,7 +329,11 @@
 		return -1;
 	}
 	res = ioctl(fd, SNDCTL_DSP_SETDUPLEX, 0);
-	if (res >= 0) {
+	
+	/* Check to see if duplex set (FreeBSD Bug)*/
+	res = ioctl(fd, SNDCTL_DSP_GETCAPS, &fmt);
+	
+	if ((fmt & DSP_CAP_DUPLEX) && !res) {
 		if (option_verbose > 1) 
 			ast_verbose(VERBOSE_PREFIX_2 "Console is full duplex\n");
 		full_duplex = -1;




More information about the svn-commits mailing list