httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@locus.apache.org
Subject cvs commit: apache-2.0/src/os/win32 iol_socket.c
Date Sun, 16 Apr 2000 16:59:41 GMT
trawick     00/04/16 09:59:41

  Modified:    src      CHANGES
               src/lib/apr/include apr_network_io.h
               src/lib/apr/network_io/beos networkio.h sendrecv.c
               src/lib/apr/network_io/os2 networkio.h sendrecv.c
               src/lib/apr/network_io/unix networkio.h sendrecv.c
               src/lib/apr/network_io/win32 networkio.h sendrecv.c
                        sockopt.c
               src/lib/apr/test ab_apr.c client.c
               src/os/beos iol_socket.c
               src/os/os2 iol_socket.c
               src/os/unix iol_socket.c
               src/os/win32 iol_socket.c
  Log:
  APR_SO_TIMEOUT now takes microseconds instead of seconds.  (The new
  CHANGES text also reflects prior work on ap_poll() and
  ap_set_pipe_timeout()).
  
  apr/test/client.c now has a crude command-line mechanism for selecting
  a read timeout.
  
  Included bug fixes:
  
  1) Some storage leaks were removed in BeOS and Unix select() usage.
  2) For Win32, the code to process APR_SO_TIMEOUT stored timeout in
     milliseconds but the code to timeout a TransmitFile() in
     ap_sendfile() assumed that it had been stored in seconds.
  3) ab_apr.c used a 30,000-second timeout in one place.  This was
     changed to a 30-second timeout.
  4) fix bad perldoc comment in apr_network_io.h which hid the
     ap_shutdown() prototype
  5) disable stdout buffering in apr/test/client.c so that messages
     appear in the correct order when an error occurs
  
  Revision  Changes    Path
  1.68      +4 -0      apache-2.0/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/CHANGES,v
  retrieving revision 1.67
  retrieving revision 1.68
  diff -u -r1.67 -r1.68
  --- CHANGES	2000/04/15 19:23:07	1.67
  +++ CHANGES	2000/04/16 16:59:37	1.68
  @@ -1,4 +1,8 @@
   Changes with Apache 2.0a3-dev
  +  *) ap_set_pipe_timeout(), ap_poll(), and APR_SO_TIMEOUT now take 
  +     microseconds instead of seconds.  Some storage leaks and other
  +     minor bugs in related code were fixed.  [Jeff Trawick]
  +
     *) Win32: First cut at getting mod_isapi working under 2.0
        [William Rowe <wrowe@lnd.com>]
   
  
  
  
  1.31      +3 -3      apache-2.0/src/lib/apr/include/apr_network_io.h
  
  Index: apr_network_io.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_network_io.h,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- apr_network_io.h	2000/04/16 04:46:56	1.30
  +++ apr_network_io.h	2000/04/16 16:59:37	1.31
  @@ -166,7 +166,7 @@
             controls which calls are still valid on the socket.
   
   =cut
  -  /
  + */
   ap_status_t ap_shutdown(ap_socket_t *ithesocket, ap_shutdown_how_e how);
   
   /*
  @@ -381,7 +381,7 @@
       arg 3) On entry, the number of bytes to receive; on exit, the number
              of bytes received.
   
  -B<NOTE>:  This functions acts like a blocking write by default.  To change 
  +B<NOTE>:  This functions acts like a blocking read by default.  To change 
             this behavior, use ap_setsocketopt with the APR_SO_TIMEOUT option.
             The number of bytes actually sent is stored in argument 3.
     
  @@ -409,7 +409,7 @@
                 APR_SO_REUSEADDR  --  The rules used in validating addresses
                                       supplied to bind should allow reuse
                                       of local addresses.
  -              APR_SO_TIMEOUT    --  Set the timeout value in seconds.
  +              APR_SO_TIMEOUT    --  Set the timeout value in microseconds.
                                       values < 0 mean wait forever.  0 means
                                       don't wait at all.
                 APR_SO_SNDBUF     --  Set the SendBufferSize
  
  
  
  1.13      +1 -1      apache-2.0/src/lib/apr/network_io/beos/networkio.h
  
  Index: networkio.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/beos/networkio.h,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- networkio.h	2000/04/14 15:58:36	1.12
  +++ networkio.h	2000/04/16 16:59:37	1.13
  @@ -91,7 +91,7 @@
       struct sockaddr_in *local_addr;
       struct sockaddr_in *remote_addr;
       int addr_len;
  -    int timeout;
  +    ap_interval_time_t timeout;
       int connected;
   };
   
  
  
  
  1.8       +12 -12    apache-2.0/src/lib/apr/network_io/beos/sendrecv.c
  
  Index: sendrecv.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/beos/sendrecv.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- sendrecv.c	2000/04/03 19:45:03	1.7
  +++ sendrecv.c	2000/04/16 16:59:38	1.8
  @@ -63,7 +63,7 @@
       } while (rv == -1 && errno == EINTR);
   
       if (rv == -1 && errno == EAGAIN && sock->timeout > 0) {
  -        struct timeval *tv;
  +        struct timeval tv, *tvptr;
           fd_set fdset;
           int srv;
   
  @@ -71,14 +71,14 @@
               FD_ZERO(&fdset);
               FD_SET(sock->socketdes, &fdset);
               if (sock->timeout == -1)
  -                tv = NULL;
  +                tvptr = NULL;
               else {
  -                tv = (struct timeval *)ap_palloc(sock->cntxt, sizeof(struct timeval));
  -                tv->tv_sec  = sock->timeout;
  -                tv->tv_usec = 0;
  +                tv.tv_sec  = sock->timeout / AP_USEC_PER_SEC;
  +                tv.tv_usec = sock->timeout % AP_USEC_PER_SEC;
  +                tvptr = &tv;
               }
               
  -            srv = select(FD_SETSIZE, NULL, &fdset, NULL, tv);
  +            srv = select(FD_SETSIZE, NULL, &fdset, NULL, tvptr);
           } while (srv == -1 && errno == EINTR);
   
           if (srv == 0) {
  @@ -108,7 +108,7 @@
       } while (rv == -1 && errno == EINTR);
   
       if (rv == -1 && errno == EAGAIN && sock->timeout > 0) {
  -        struct timeval *tv;
  +        struct timeval tv, *tvptr;
           fd_set fdset;
           int srv;
   
  @@ -116,14 +116,14 @@
               FD_ZERO(&fdset);
               FD_SET(sock->socketdes, &fdset);
               if (sock->timeout == -1)
  -                tv = NULL;
  +                tvptr = NULL;
               else {
  -                tv = (struct timeval *)ap_palloc(sock->cntxt, sizeof(struct timeval));
  -                tv->tv_sec  = sock->timeout;
  -                tv->tv_usec = 0;
  +                tv.tv_sec  = sock->timeout / AP_USEC_PER_SEC;
  +                tv.tv_usec = sock->timeout % AP_USEC_PER_SEC;
  +                tvptr = &tv;
               }
               
  -            srv = select(FD_SETSIZE, &fdset, NULL, NULL, tv);
  +            srv = select(FD_SETSIZE, &fdset, NULL, NULL, tvptr);
           } while (srv == -1 && errno == EINTR);
   
           if (srv == 0) {
  
  
  
  1.12      +1 -1      apache-2.0/src/lib/apr/network_io/os2/networkio.h
  
  Index: networkio.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/os2/networkio.h,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- networkio.h	2000/04/14 15:58:37	1.11
  +++ networkio.h	2000/04/16 16:59:38	1.12
  @@ -65,7 +65,7 @@
       struct sockaddr_in *local_addr;
       struct sockaddr_in *remote_addr;
       int addr_len;
  -    int timeout;
  +    ap_interval_time_t timeout;
       int nonblock;
   };
   
  
  
  
  1.13      +3 -3      apache-2.0/src/lib/apr/network_io/os2/sendrecv.c
  
  Index: sendrecv.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/os2/sendrecv.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- sendrecv.c	2000/04/08 06:58:41	1.12
  +++ sendrecv.c	2000/04/16 16:59:38	1.13
  @@ -67,7 +67,7 @@
       do {
           if (!sock->nonblock || err == SOCEWOULDBLOCK) {
               fds = sock->socketdes;
  -            rv = select(&fds, 0, 1, 0, sock->timeout >= 0 ? sock->timeout*1000
: -1);
  +            rv = select(&fds, 0, 1, 0, sock->timeout >= 0 ? sock->timeout/1000
: -1);
   
               if (rv != 1) {
                   *len = 0;
  @@ -106,7 +106,7 @@
       do {
           if (!sock->nonblock || err == SOCEWOULDBLOCK) {
               fds = sock->socketdes;
  -            rv = select(&fds, 1, 0, 0, sock->timeout >= 0 ? sock->timeout*1000
: -1);
  +            rv = select(&fds, 1, 0, 0, sock->timeout >= 0 ? sock->timeout/1000
: -1);
   
               if (rv != 1) {
                   *len = 0;
  @@ -149,7 +149,7 @@
       do {
           if (!sock->nonblock || err == SOCEWOULDBLOCK) {
               fds = sock->socketdes;
  -            rv = select(&fds, 0, 1, 0, sock->timeout >= 0 ? sock->timeout*1000
: -1);
  +            rv = select(&fds, 0, 1, 0, sock->timeout >= 0 ? sock->timeout/1000
: -1);
   
               if (rv != 1) {
                   *len = 0;
  
  
  
  1.23      +1 -1      apache-2.0/src/lib/apr/network_io/unix/networkio.h
  
  Index: networkio.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/unix/networkio.h,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- networkio.h	2000/04/14 15:58:40	1.22
  +++ networkio.h	2000/04/16 16:59:38	1.23
  @@ -112,7 +112,7 @@
       struct sockaddr_in *local_addr;
       struct sockaddr_in *remote_addr;
       socklen_t addr_len;
  -    int timeout; 
  +    ap_interval_time_t timeout; 
   #ifndef HAVE_POLL
       int connected;
   #endif
  
  
  
  1.21      +18 -33    apache-2.0/src/lib/apr/network_io/unix/sendrecv.c
  
  Index: sendrecv.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/unix/sendrecv.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- sendrecv.c	2000/04/14 01:38:45	1.20
  +++ sendrecv.c	2000/04/16 16:59:38	1.21
  @@ -69,20 +69,27 @@
   
   static ap_status_t wait_for_io_or_timeout(ap_socket_t *sock, int for_read)
   {
  -    struct timeval tv;
  +    struct timeval tv, *tvptr;
       fd_set fdset;
       int srv;
   
       do {
   	FD_ZERO(&fdset);
   	FD_SET(sock->socketdes, &fdset);
  -	tv.tv_sec = sock->timeout;
  -	tv.tv_usec = 0;
  -	srv = select(FD_SETSIZE,
  +        if (sock->timeout < 0) {
  +            tvptr = NULL;
  +        }
  +        else {
  +            tv.tv_sec = sock->timeout / AP_USEC_PER_SEC;
  +            tv.tv_usec = sock->timeout % AP_USEC_PER_SEC;
  +            tvptr = &tv;
  +        }
  +	srv = select(sock->socketdes + 1,
   	    for_read ? &fdset : NULL,
   	    for_read ? NULL : &fdset,
   	    NULL,
  -	    sock->timeout < 0 ? NULL : &tv);
  +	    tvptr);
  +        /* TODO - timeout should be smaller on repeats of this loop */
       } while (srv == -1 && errno == EINTR);
   
       if (srv == 0) {
  @@ -400,34 +407,12 @@
       if (rv == -1 && 
           (errno == EAGAIN || errno == EWOULDBLOCK) && 
           sock->timeout != 0) {
  -        struct timeval *tv;
  -        fd_set fdset;
  -        int srv;
  -
  -        do {
  -            FD_ZERO(&fdset);
  -            FD_SET(sock->socketdes, &fdset);
  -            if (sock->timeout < 0) {
  -        	tv = NULL;
  -            }
  -            else {
  -		/* XXX:  BUHHH? wow, what a memory leak! */
  -        	tv = ap_palloc(sock->cntxt, sizeof(struct timeval));
  -        	tv->tv_sec = sock->timeout;
  -        	tv->tv_usec = 0;
  -            }
  -            srv = select(FD_SETSIZE, NULL, &fdset, NULL, tv);
  -        } while (srv == -1 && errno == EINTR);
  -
  -        if (srv == 0) {
  -	    /* XXX: -1 is wrong */
  -            (*len) = -1;
  -            return APR_TIMEUP;
  -        }
  -        else if (srv < 0) {
  -	    /* XXX: -1 is wrong */
  -            (*len) = -1;
  -            return errno;
  +        ap_status_t arv = wait_for_io_or_timeout(sock, 0);
  +
  +        if (arv != APR_SUCCESS) {
  +            /* jlt: not tested, but this matches other sendfile logic */
  +            (*len) = 0;
  +            return arv;
           }
           else {
               do {
  
  
  
  1.10      +1 -1      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.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- networkio.h	2000/04/14 15:58:41	1.9
  +++ networkio.h	2000/04/16 16:59:39	1.10
  @@ -64,7 +64,7 @@
       struct sockaddr_in *local_addr;
       struct sockaddr_in *remote_addr;
       size_t addr_len;
  -    int timeout;
  +    ap_interval_time_t timeout;
   };
   
   struct ap_pollfd_t {
  
  
  
  1.14      +4 -2      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.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- sendrecv.c	2000/04/03 19:45:14	1.13
  +++ sendrecv.c	2000/04/16 16:59:39	1.14
  @@ -239,9 +239,11 @@
           lasterror = WSAGetLastError();
           if (lasterror == ERROR_IO_PENDING) {
   #ifdef WAIT_FOR_EVENT
  -            rv = WaitForSingleObject(overlapped.hEvent, sock->timeout * 1000);
  +            rv = WaitForSingleObject(overlapped.hEvent, 
  +                                     sock->timeout >= 0 ? sock->timeout / 1000
: INFINITE);
   #else
  -            rv = WaitForSingleObject((HANDLE) sock->sock, sock->timeout * 1000);
  +            rv = WaitForSingleObject((HANDLE) sock->sock, 
  +                                     sock->timeout >= 0 ? sock->timeout / 1000
: INFINITE);
   #endif
               if (rv == WAIT_OBJECT_0)
                   lasterror = APR_SUCCESS;
  
  
  
  1.14      +3 -2      apache-2.0/src/lib/apr/network_io/win32/sockopt.c
  
  Index: sockopt.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/win32/sockopt.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- sockopt.c	2000/04/14 15:58:41	1.13
  +++ sockopt.c	2000/04/16 16:59:39	1.14
  @@ -91,8 +91,9 @@
           one = 0;
   
       if (opt & APR_SO_TIMEOUT) {
  -        int timeout = on * 1000;  /* Windows needs timeout in mSeconds */
  -        sock->timeout = timeout;
  +        int timeout;
  +        sock->timeout = on;
  +        timeout = on / 1000; /* Windows needs timeout in mSeconds */
           if (setsockopt(sock->sock, SOL_SOCKET, SO_RCVTIMEO, (char*) &timeout, 
                          sizeof(timeout)) == SOCKET_ERROR) {
               return WSAGetLastError();
  
  
  
  1.23      +2 -2      apache-2.0/src/lib/apr/test/ab_apr.c
  
  Index: ab_apr.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/test/ab_apr.c,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- ab_apr.c	2000/04/16 02:27:54	1.22
  +++ ab_apr.c	2000/04/16 16:59:39	1.23
  @@ -160,7 +160,7 @@
   ap_ssize_t postlen = 0;		/* length of data to be POSTed */
   char content_type[1024];	/* content type to put in POST header */
   int port = 80;			/* port number */
  -time_t aprtimeout = 30000;	/* timeout value... */
  +time_t aprtimeout = 30 * AP_USEC_PER_SEC; /* timeout value... */
   
   int use_html = 0;		/* use html in the report */
   char *tablestring;
  @@ -218,7 +218,7 @@
   {
       ap_ssize_t len = reqlen;
       c->connect = ap_now();
  -    ap_setsocketopt(c->aprsock, APR_SO_TIMEOUT, 30);
  +    ap_setsocketopt(c->aprsock, APR_SO_TIMEOUT, 30 * AP_USEC_PER_SEC);
       if (ap_send(c->aprsock, request, &reqlen) != APR_SUCCESS &&
           reqlen != len) {
           printf("Send request failed!\n");
  
  
  
  1.10      +27 -8     apache-2.0/src/lib/apr/test/client.c
  
  Index: client.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/test/client.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- client.c	2000/04/14 15:58:43	1.9
  +++ client.c	2000/04/16 16:59:39	1.10
  @@ -71,11 +71,17 @@
       char *local_ipaddr, *remote_ipaddr;
       char *dest = "127.0.0.1";
       ap_uint32_t local_port, remote_port;
  +    ap_interval_time_t read_timeout = -1;
   
  +    setbuf(stdout, NULL);
       if (argc > 1) {
           dest = argv[1];
       }
   
  +    if (argc > 2) {
  +        read_timeout = AP_USEC_PER_SEC * atoi(argv[2]);
  +    }
  +
       fprintf(stdout, "Initializing.........");
       if (ap_initialize() != APR_SUCCESS) {
           fprintf(stderr, "Something went wrong\n");
  @@ -98,13 +104,15 @@
       }
       fprintf(stdout, "OK\n");
   
  -    fprintf(stdout, "\tClient:  Setting socket option NONBLOCK.......");
  -    if (ap_setsocketopt(sock, APR_SO_NONBLOCK, 1) != APR_SUCCESS) {
  -        ap_close_socket(sock);
  -        fprintf(stderr, "Couldn't set socket option\n");
  -        exit(-1);
  +    if (read_timeout == -1) {
  +        fprintf(stdout, "\tClient:  Setting socket option NONBLOCK.......");
  +        if (ap_setsocketopt(sock, APR_SO_NONBLOCK, 1) != APR_SUCCESS) {
  +            ap_close_socket(sock);
  +            fprintf(stderr, "Couldn't set socket option\n");
  +            exit(-1);
  +        }
  +        fprintf(stdout, "OK\n");
       }
  -    fprintf(stdout, "OK\n");
   
       fprintf(stdout, "\tClient:  Setting port for socket.......");
       if (ap_set_remote_port(sock, 8021) != APR_SUCCESS) {
  @@ -143,11 +151,22 @@
       }
       fprintf(stdout, "OK\n");
      
  +    if (read_timeout != -1) {
  +        fprintf(stdout, "\tClient:  Setting read timeout.......");
  +        stat = ap_setsocketopt(sock, APR_SO_TIMEOUT, read_timeout);
  +        if (stat) {
  +            fprintf(stderr, "Problem setting timeout: %d\n", stat);
  +            exit(-1);
  +        }
  +        fprintf(stdout, "OK\n");
  +    }
  +
       length = STRLEN; 
       fprintf(stdout, "\tClient:  Trying to receive data over socket.......");
  -    if (ap_recv(sock, datarecv, &length) != APR_SUCCESS) {
  +
  +    if ((stat = ap_recv(sock, datarecv, &length)) != APR_SUCCESS) {
           ap_close_socket(sock);
  -        fprintf(stderr, "Problem receiving data\n");
  +        fprintf(stderr, "Problem receiving data: %d\n", stat);
           exit(-1);
       }
       if (strcmp(datarecv, "Recv data test")) {
  
  
  
  1.9       +2 -1      apache-2.0/src/os/beos/iol_socket.c
  
  Index: iol_socket.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/os/beos/iol_socket.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- iol_socket.c	2000/04/13 00:37:56	1.8
  +++ iol_socket.c	2000/04/16 16:59:40	1.9
  @@ -76,7 +76,8 @@
   
       switch (opt) {
       case AP_IOL_TIMEOUT:
  -        ap_setsocketopt(iol->sock, APR_SO_TIMEOUT, *(const int*)value);
  +        ap_setsocketopt(iol->sock, APR_SO_TIMEOUT, 
  +                        *(const int*)value * AP_USEC_PER_SEC);
           break;
       default:
   	    return APR_EINVAL;
  
  
  
  1.12      +2 -1      apache-2.0/src/os/os2/iol_socket.c
  
  Index: iol_socket.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/os/os2/iol_socket.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- iol_socket.c	2000/04/13 00:37:56	1.11
  +++ iol_socket.c	2000/04/16 16:59:40	1.12
  @@ -78,7 +78,8 @@
   {
       switch (opt) {
       case AP_IOL_TIMEOUT:
  -        ap_setsocketopt(((iol_socket *)viol)->sock, APR_SO_TIMEOUT, *(const int *)value);
  +        ap_setsocketopt(((iol_socket *)viol)->sock, APR_SO_TIMEOUT, 
  +                        *(const int *)value * AP_USEC_PER_SEC);
   	break;
       default:
   	return APR_EINVAL;
  
  
  
  1.21      +2 -1      apache-2.0/src/os/unix/iol_socket.c
  
  Index: iol_socket.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/os/unix/iol_socket.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- iol_socket.c	2000/04/13 00:37:56	1.20
  +++ iol_socket.c	2000/04/16 16:59:40	1.21
  @@ -79,7 +79,8 @@
   
       switch (opt) {
       case AP_IOL_TIMEOUT:
  -        ap_setsocketopt(iol->sock, APR_SO_TIMEOUT, *(const int*)value);
  +        ap_setsocketopt(iol->sock, APR_SO_TIMEOUT, 
  +                        *(const int*)value * AP_USEC_PER_SEC);
           break;
       default:
   	    return APR_EINVAL;
  
  
  
  1.15      +2 -1      apache-2.0/src/os/win32/iol_socket.c
  
  Index: iol_socket.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/os/win32/iol_socket.c,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- iol_socket.c	2000/04/14 15:59:17	1.14
  +++ iol_socket.c	2000/04/16 16:59:41	1.15
  @@ -73,7 +73,8 @@
   
       switch (opt) {
       case AP_IOL_TIMEOUT:
  -        ap_setsocketopt(iol->sock, APR_SO_TIMEOUT, *(const int*)value);
  +        ap_setsocketopt(iol->sock, APR_SO_TIMEOUT, 
  +                        *(const int*)value * (int)AP_USEC_PER_SEC);
   	break;
       default:
   	return APR_EINVAL;
  
  
  

Mime
View raw message