[Asterisk-cvs] asterisk/pbx pbx_wilcalu.c,1.11,1.12
markster at lists.digium.com
markster at lists.digium.com
Sun Apr 25 22:56:58 CDT 2004
Update of /usr/cvsroot/asterisk/pbx
In directory mongoose.digium.com:/tmp/cvs-serv25594/pbx
Modified Files:
pbx_wilcalu.c
Log Message:
More select/poll updates for various applications
Index: pbx_wilcalu.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx/pbx_wilcalu.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- pbx_wilcalu.c 28 Jan 2004 21:32:48 -0000 1.11
+++ pbx_wilcalu.c 26 Apr 2004 03:02:49 -0000 1.12
@@ -61,7 +61,7 @@
char * sendbufptr=sendbuf;
int fd=open(dialfile,O_RDONLY|O_NONBLOCK);
int flags = fcntl(fd, F_GETFL);
- fd_set fds;
+ struct pollfd fds[1];
fcntl(fd, F_SETFL, flags & ~O_NONBLOCK);
if (option_debug)
ast_log(LOG_DEBUG, "Entered Wil-Calu fd=%d\n",fd);
@@ -77,9 +77,9 @@
void *pass;
memset(buf,0,257);
- FD_ZERO(&fds);
- FD_SET(fd, &fds);
- ast_select(fd + 1, &fds, NULL, NULL, NULL);
+ fds[0].fd = fd;
+ fds[0].events = POLLIN;
+ poll(fds, 1, -1);
bytes=read(fd,buf,256);
buf[(int)bytes]=0;
More information about the svn-commits
mailing list