You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by co...@apache.org on 2002/07/02 18:53:15 UTC

cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_socket.c

costin      2002/07/02 09:53:15

  Modified:    jk/native2/common jk_channel_socket.c
  Log:
  Minor fix - unix doesn't know about ioctlsocket.
  
  For 5.0 we should deprecate the old 'backward compat' components
  and use only APR.
  
  Revision  Changes    Path
  1.37      +4 -2      jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c
  
  Index: jk_channel_socket.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- jk_channel_socket.c	27 Jun 2002 17:16:28 -0000	1.36
  +++ jk_channel_socket.c	2 Jul 2002 16:53:15 -0000	1.37
  @@ -285,10 +285,12 @@
           /* convert from seconds to ms */
           int set = ntimeout * 1000;
           u_long zero = 0;
  -        if (ioctlsocket(sock, FIONBIO, &zero) == SOCKET_ERROR) {
   #ifdef WIN32
  +        if (ioctlsocket(sock, FIONBIO, &zero) == SOCKET_ERROR) {
               errno = WSAGetLastError() - WSABASEERR;
  -#endif /* WIN32 */            
  +#else
  +        if (ioctl(sock, FIONBIO, &zero) != 0) {
  +#endif
               env->l->jkLog(env, env->l, JK_LOG_ERROR,
                             "channelSocket.open() ioctlcocket failed %s:%d %d %s \n",
                              socketInfo->host, socketInfo->port, errno, strerror( errno ) );
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>