[asterisk-commits] tilghman: branch tilghman/ast_select r280268 - in /team/tilghman/ast_select: ...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jul 28 15:42:55 CDT 2010


Author: tilghman
Date: Wed Jul 28 15:42:52 2010
New Revision: 280268

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=280268
Log:
compiles, now on to figure out how to ensure the configure test runs as root...

Modified:
    team/tilghman/ast_select/channels/chan_alsa.c
    team/tilghman/ast_select/channels/chan_misdn.c
    team/tilghman/ast_select/channels/chan_oss.c
    team/tilghman/ast_select/channels/chan_phone.c
    team/tilghman/ast_select/main/poll.c

Modified: team/tilghman/ast_select/channels/chan_alsa.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/ast_select/channels/chan_alsa.c?view=diff&rev=280268&r1=280267&r2=280268
==============================================================================
--- team/tilghman/ast_select/channels/chan_alsa.c (original)
+++ team/tilghman/ast_select/channels/chan_alsa.c Wed Jul 28 15:42:52 2010
@@ -277,8 +277,8 @@
 
 static void *sound_thread(void *unused)
 {
-	fd_set rfds;
-	fd_set wfds;
+	ast_fdset rfds;
+	ast_fdset wfds;
 	int max, res;
 
 	for (;;) {

Modified: team/tilghman/ast_select/channels/chan_misdn.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/ast_select/channels/chan_misdn.c?view=diff&rev=280268&r1=280267&r2=280268
==============================================================================
--- team/tilghman/ast_select/channels/chan_misdn.c (original)
+++ team/tilghman/ast_select/channels/chan_misdn.c Wed Jul 28 15:42:52 2010
@@ -2763,7 +2763,7 @@
 static struct ast_frame *misdn_read(struct ast_channel *ast)
 {
 	struct chan_list *tmp;
-	fd_set rrfs;
+	ast_fdset rrfs;
 	struct timeval tv;
 	int len, t;
 
@@ -2787,7 +2787,7 @@
 	FD_ZERO(&rrfs);
 	FD_SET(tmp->pipe[0],&rrfs);
 
-	t=select(FD_SETSIZE,&rrfs,NULL, NULL,&tv);
+	t = ast_select(tmp->pipe[0] + 1, &rrfs, NULL, NULL, &tv);
 
 	if (!t) {
 		chan_misdn_log(3, tmp->bc->port, "read Select Timed out\n");
@@ -4910,14 +4910,14 @@
 			if (ch->ast) 
 				ast_queue_frame(ch->ast, &frame);
 		} else {
-			fd_set wrfs;
+			ast_fdset wrfs;
 			struct timeval tv = { 0, 0 };
 			int t;
 
 			FD_ZERO(&wrfs);
 			FD_SET(ch->pipe[1], &wrfs);
 
-			t = select(FD_SETSIZE, NULL, &wrfs, NULL, &tv);
+			t = ast_select(ch->pipe[1] + 1, NULL, &wrfs, NULL, &tv);
 
 			if (!t) {
 				chan_misdn_log(9, bc->port, "Select Timed out\n");

Modified: team/tilghman/ast_select/channels/chan_oss.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/ast_select/channels/chan_oss.c?view=diff&rev=280268&r1=280267&r2=280268
==============================================================================
--- team/tilghman/ast_select/channels/chan_oss.c (original)
+++ team/tilghman/ast_select/channels/chan_oss.c Wed Jul 28 15:42:52 2010
@@ -604,7 +604,7 @@
 	if (read(o->sounddev, ign, sizeof(ign)) < 0) {
 	}
 	for (;;) {
-		fd_set rfds, wfds;
+		ast_fdset rfds, wfds;
 		int maxfd, res;
 
 		pthread_testcancel();

Modified: team/tilghman/ast_select/channels/chan_phone.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/ast_select/channels/chan_phone.c?view=diff&rev=280268&r1=280267&r2=280268
==============================================================================
--- team/tilghman/ast_select/channels/chan_phone.c (original)
+++ team/tilghman/ast_select/channels/chan_phone.c Wed Jul 28 15:42:52 2010
@@ -997,7 +997,7 @@
 
 static void *do_monitor(void *data)
 {
-	fd_set rfds, efds;
+	ast_fdset rfds, efds;
 	int n, res;
 	struct phone_pvt *i;
 	int tonepos = 0;

Modified: team/tilghman/ast_select/main/poll.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/ast_select/main/poll.c?view=diff&rev=280268&r1=280267&r2=280268
==============================================================================
--- team/tilghman/ast_select/main/poll.c (original)
+++ team/tilghman/ast_select/main/poll.c Wed Jul 28 15:42:52 2010
@@ -99,16 +99,16 @@
 #if __STDC__ > 0
 			(struct pollfd *pArray,
 			  unsigned long  n_fds,
-			  fd_set        *pReadSet,
-			  fd_set        *pWriteSet,
-			  fd_set        *pExceptSet)
+			  ast_fdset     *pReadSet,
+			  ast_fdset     *pWriteSet,
+			  ast_fdset     *pExceptSet)
 #else
 			 (pArray, n_fds, pReadSet, pWriteSet, pExceptSet)
 			  struct pollfd *pArray;
 			  unsigned long  n_fds;
-			  fd_set        *pReadSet;
-			  fd_set        *pWriteSet;
-			  fd_set        *pExceptSet;
+			  ast_fdset     *pReadSet;
+			  ast_fdset     *pWriteSet;
+			  ast_fdset     *pExceptSet;
 #endif
 {
     register unsigned long  i;                   /* loop control */
@@ -217,16 +217,16 @@
 #if __STDC__ > 0
 			 (struct pollfd *pArray,
 			  unsigned long  n_fds,
-			  fd_set        *pReadSet,
-			  fd_set        *pWriteSet,
-			  fd_set        *pExceptSet)
+			  ast_fdset     *pReadSet,
+			  ast_fdset     *pWriteSet,
+			  ast_fdset     *pExceptSet)
 #else
 			 (pArray, n_fds, pReadSet, pWriteSet, pExceptSet)
 			  struct pollfd *pArray;
 			  unsigned long  n_fds;
-			  fd_set        *pReadSet;
-			  fd_set        *pWriteSet;
-			  fd_set        *pExceptSet;
+			  ast_fdset     *pReadSet;
+			  ast_fdset     *pWriteSet;
+			  ast_fdset     *pExceptSet;
 #endif
 {
     register unsigned long  i;                   /* loop control */
@@ -261,9 +261,9 @@
 
 int ast_internal_poll(struct pollfd *pArray, unsigned long n_fds, int timeout)
 {
-    fd_set  read_descs;                          /* input file descs */
-    fd_set  write_descs;                         /* output file descs */
-    fd_set  except_descs;                        /* exception descs */
+    ast_fdset  read_descs;                       /* input file descs */
+    ast_fdset  write_descs;                      /* output file descs */
+    ast_fdset  except_descs;                     /* exception descs */
     struct  timeval stime;                       /* select() timeout value */
     int	    ready_descriptors;                   /* function result */
     int	    max_fd = 0;                          /* maximum fd value */
@@ -276,7 +276,7 @@
     /* Map the poll() file descriptor list in the select() data structures. */
 
 	if (pArray) {
-    	max_fd = map_poll_spec (pArray, n_fds,
+		max_fd = map_poll_spec (pArray, n_fds,
 				&read_descs, &write_descs, &except_descs);
 	}
 
@@ -286,12 +286,12 @@
 
     /* Make the select() call. */
 
-    ready_descriptors = select (max_fd + 1, &read_descs, &write_descs,
+    ready_descriptors = ast_select(max_fd + 1, &read_descs, &write_descs,
 				&except_descs, pTimeout);
 
     if (ready_descriptors >= 0)
     {
-	map_select_results (pArray, n_fds,
+		map_select_results (pArray, n_fds,
 			    &read_descs, &write_descs, &except_descs);
     }
 




More information about the asterisk-commits mailing list