/[monit]/monit/net.c
ViewVC logotype

Diff of /monit/net.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.12 by hauk, Fri Sep 6 18:13:37 2002 UTC revision 1.13 by rory, Thu Sep 12 01:48:03 2002 UTC
# Line 169  int check_connection_io(Port_T p) { Line 169  int check_connection_io(Port_T p) {
169   */   */
170  int check_socket(int socket) {  int check_socket(int socket) {
171        
172    fd_set fdset;    fd_set rset, wset;
173    struct timeval tv;    struct timeval tv;
174    
175    FD_ZERO(&fdset);    FD_ZERO(&rset);
176    FD_SET(socket, &fdset);    FD_ZERO(&wset);
177      FD_SET(socket, &rset);
178      FD_SET(socket, &wset);
179    tv.tv_sec= SELECT_TIMEOUT;    tv.tv_sec= SELECT_TIMEOUT;
180    tv.tv_usec= 0;    tv.tv_usec= 0;
181    
182    return (select(socket+1, &fdset, &fdset, NULL, &tv) > 0);    return (select(socket+1, &rset, &wset, NULL, &tv) > 0);
       
183  }  }
184    
185    

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26