apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: apr/network_io/win32 sockets.c sockopt.c
Date Mon, 15 Jul 2002 06:44:17 GMT
wrowe       2002/07/14 23:44:17

  Modified:    network_io/win32 sockets.c sockopt.c
  Log:
    Use the correct macros
  
  Revision  Changes    Path
  1.82      +3 -2      apr/network_io/win32/sockets.c
  
  Index: sockets.c
  ===================================================================
  RCS file: /home/cvs/apr/network_io/win32/sockets.c,v
  retrieving revision 1.81
  retrieving revision 1.82
  diff -u -r1.81 -r1.82
  --- sockets.c	15 Jul 2002 06:17:36 -0000	1.81
  +++ sockets.c	15 Jul 2002 06:44:16 -0000	1.82
  @@ -315,8 +315,9 @@
               tvptr = NULL;
           }
           else {
  -            tv.tv_sec =  apr_time_sec_get(sock->timeout);
  -            tv.tv_usec = apr_time_usec_get(sock->timeout);
  +            /* casts for winsock/timeval definition */
  +            tv.tv_sec =  (long)apr_time_sec(sock->timeout);
  +            tv.tv_usec = (int)apr_time_usec(sock->timeout);
               tvptr = &tv;
           }
           rc = select(FD_SETSIZE+1, NULL, &wfdset, &efdset, tvptr);
  
  
  
  1.40      +3 -3      apr/network_io/win32/sockopt.c
  
  Index: sockopt.c
  ===================================================================
  RCS file: /home/cvs/apr/network_io/win32/sockopt.c,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- sockopt.c	15 Jul 2002 06:17:36 -0000	1.39
  +++ sockopt.c	15 Jul 2002 06:44:16 -0000	1.40
  @@ -99,8 +99,8 @@
           /* Reset socket timeouts if the new timeout differs from the old timeout */
           if (sock->timeout != t) 
           {
  -            /* Win32 timeouts are in msec */
  -            sock->timeout_ms = apr_time_as_msec(t);
  +            /* Win32 timeouts are in msec, represented as int */
  +            sock->timeout_ms = (int)apr_time_as_msec(t);
               setsockopt(sock->sock, SOL_SOCKET, SO_RCVTIMEO, 
                          (char *) &sock->timeout_ms, 
                          sizeof(sock->timeout_ms));
  @@ -153,7 +153,7 @@
               if (sock->timeout != on) 
               {
                   /* Win32 timeouts are in msec */
  -                sock->timeout_ms = apr_time_to_msec(on);
  +                sock->timeout_ms = apr_time_as_msec(on);
                   setsockopt(sock->sock, SOL_SOCKET, SO_RCVTIMEO, 
                              (char *) &sock->timeout_ms, 
                              sizeof(sock->timeout_ms));
  
  
  

Mime
View raw message