httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stodd...@hyperreal.org
Subject cvs commit: apache-2.0/src/lib/apr/network_io/win32 networkio.h poll.c sendrecv.c sockets.c
Date Wed, 22 Sep 1999 17:30:44 GMT
stoddard    99/09/22 10:30:42

  Modified:    src/lib/apr/network_io/win32 networkio.h poll.c sendrecv.c
                        sockets.c
  Log:
  Updates to get network_io compiling on Win32
  
  Revision  Changes    Path
  1.2       +1 -0      apache-2.0/src/lib/apr/network_io/win32/networkio.h
  
  Index: networkio.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/win32/networkio.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- networkio.h	1999/08/17 15:59:43	1.1
  +++ networkio.h	1999/09/22 17:30:34	1.2
  @@ -65,6 +65,7 @@
       char *remote_hostname;
       struct sockaddr_in *addr;
       size_t addr_len;
  +    int timeout;
   };
   
   struct pollfd_t {
  
  
  
  1.2       +5 -4      apache-2.0/src/lib/apr/network_io/win32/poll.c
  
  Index: poll.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/win32/poll.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- poll.c	1999/08/17 15:59:43	1.1
  +++ poll.c	1999/09/22 17:30:36	1.2
  @@ -196,10 +196,10 @@
       return APR_SUCCESS;
   }
   
  -ap_status_t ap_get_polldata(struct pollfd_t *pollfd, void *data)
  +ap_status_t ap_get_polldata(struct pollfd_t *pollfd, char *key, void *data)
   {
       if (pollfd != NULL) {
  -        return ap_get_userdata(pollfd->cntxt, &data);
  +        return ap_get_userdata(pollfd->cntxt, key, &data);
       }
       else {
           data = NULL;
  @@ -207,10 +207,11 @@
       }
   }
   
  -ap_status_t ap_set_polldata(struct pollfd_t *pollfd, void *data)
  +ap_status_t ap_set_polldata(struct pollfd_t *pollfd, void *data, char *key,
  +                            ap_status_t (*cleanup) (void *))
   {
       if (pollfd != NULL) {
  -        return ap_set_userdata(pollfd->cntxt, data);
  +        return ap_set_userdata(pollfd->cntxt, data, key, cleanup);
       }
       else {
           data = NULL;
  
  
  
  1.2       +6 -6      apache-2.0/src/lib/apr/network_io/win32/sendrecv.c
  
  Index: sendrecv.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/win32/sendrecv.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- sendrecv.c	1999/08/17 15:59:43	1.1
  +++ sendrecv.c	1999/09/22 17:30:37	1.2
  @@ -62,7 +62,7 @@
   #include "apr_lib.h"
   #include <time.h>
   
  -ap_status_t ap_send(struct socket_t *sock, const char *buf, ap_ssize_t *len, time_t sec)
  +ap_status_t ap_send(struct socket_t *sock, const char *buf, ap_ssize_t *len)
   {
       ap_ssize_t rv;
       WSABUF data;
  @@ -77,7 +77,7 @@
           } 
       } while (rv == SOCKET_ERROR && lasterror == WSAEINTR);
   
  -    if (rv == SOCKET_ERROR && lasterror == WSAEWOULDBLOCK && sec > 0)
{
  +    if (rv == SOCKET_ERROR && lasterror == WSAEWOULDBLOCK && sock->timeout
> 0) {
           struct timeval tv;
           fd_set fdset;
           int srv;
  @@ -85,7 +85,7 @@
           do {
               FD_ZERO(&fdset);
               FD_SET(sock->sock, &fdset);
  -            tv.tv_sec  = sec;
  +            tv.tv_sec  = sock->timeout;
               tv.tv_usec = 0;
   
               srv = select(FD_SETSIZE, NULL, &fdset, NULL, &tv);
  @@ -114,7 +114,7 @@
       return APR_SUCCESS;
   }
   
  -ap_status_t ap_recv(struct socket_t *sock, char *buf, ap_ssize_t *len, time_t sec)
  +ap_status_t ap_recv(struct socket_t *sock, char *buf, ap_ssize_t *len)
   {
       ap_ssize_t rv;
       int lasterror;
  @@ -126,7 +126,7 @@
           } 
       } while (rv == SOCKET_ERROR && lasterror == WSAEINTR);
   
  -    if (rv == SOCKET_ERROR && lasterror == WSAEWOULDBLOCK && sec > 0)
{
  +    if (rv == SOCKET_ERROR && lasterror == WSAEWOULDBLOCK && sock->timeout
> 0) {
           struct timeval tv;
           fd_set fdset;
           int srv;
  @@ -134,7 +134,7 @@
           do {
               FD_ZERO(&fdset);
               FD_SET(sock->sock, &fdset);
  -            tv.tv_sec  = sec;
  +            tv.tv_sec  = sock->timeout;
               tv.tv_usec = 0;
   
               srv = select(FD_SETSIZE, &fdset, NULL, NULL, &tv);
  
  
  
  1.2       +5 -4      apache-2.0/src/lib/apr/network_io/win32/sockets.c
  
  Index: sockets.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/win32/sockets.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- sockets.c	1999/08/17 15:59:43	1.1
  +++ sockets.c	1999/09/22 17:30:37	1.2
  @@ -242,10 +242,10 @@
       }
   }
   
  -ap_status_t ap_get_socketdata(struct socket_t *socket, void *data)
  +ap_status_t ap_get_socketdata(struct socket_t *socket, char *key, void *data)
   {
       if (socket != NULL) {
  -        return ap_get_userdata(socket->cntxt, &data);
  +        return ap_get_userdata(socket->cntxt, key, &data);
       }
       else {
           data = NULL;
  @@ -253,10 +253,11 @@
       }
   }
   
  -ap_status_t ap_set_socketdata(struct socket_t *socket, void *data)
  +ap_status_t ap_set_socketdata(struct socket_t *socket, void *data, char *key, 
  +                              ap_status_t (*cleanup) (void *))
   {
       if (socket != NULL) {
  -        return ap_set_userdata(socket->cntxt, data);
  +        return ap_set_userdata(socket->cntxt, data, key, cleanup);
       }
       else {
           data = NULL;
  
  
  

Mime
View raw message