[Asterisk-cvs] asterisk utils.c,1.33,1.34

markster at lists.digium.com markster at lists.digium.com
Fri Mar 4 21:23:51 CST 2005


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

Modified Files:
	utils.c 
Log Message:
Make mpg123 behave more nicely


Index: utils.c
===================================================================
RCS file: /usr/cvsroot/asterisk/utils.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- utils.c	4 Mar 2005 00:01:41 -0000	1.33
+++ utils.c	5 Mar 2005 03:20:55 -0000	1.34
@@ -24,6 +24,7 @@
 #include <arpa/inet.h>
 #include <asterisk/lock.h>
 #include <asterisk/utils.h>
+#include <asterisk/io.h>
 #include <asterisk/logger.h>
 #include <asterisk/md5.h>
 
@@ -404,6 +405,15 @@
 	return pthread_create(thread, attr, start_routine, data); /* We're in ast_pthread_create, so it's okay */
 }
 
+int ast_wait_for_input(int fd, int ms)
+{
+	struct pollfd pfd[1];
+	memset(pfd, 0, sizeof(pfd));
+	pfd[0].fd = fd;
+	pfd[0].events = POLLIN|POLLPRI;
+	return poll(pfd, 1, ms);
+}
+
 /* Case-insensitive substring matching */
 #ifndef LINUX
 static char *upper(const char *orig, char *buf, int bufsize)




More information about the svn-commits mailing list