mturk 2005/02/21 03:18:48 Modified: jk/native/common jk_connect.c jk_uri_worker_map.c Log: Remove unused code. Revision Changes Path 1.45 +4 -36 jakarta-tomcat-connectors/jk/native/common/jk_connect.c Index: jk_connect.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_connect.c,v retrieving revision 1.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- jk_connect.c 20 Feb 2005 08:15:33 -0000 1.44 +++ jk_connect.c 21 Feb 2005 11:18:48 -0000 1.45 @@ -382,6 +382,7 @@ return buf; } +#if 0 static int soblock(int sd) { /* BeOS uses setsockopt at present for non blocking... */ @@ -439,7 +440,8 @@ return 0; } -#if 1 +#endif + int jk_is_socket_connected(int sd, int timeout) { fd_set fd; @@ -462,37 +464,3 @@ return 0; } } - -#else - -#if defined(WIN32) || (defined(NETWARE) && defined(__NOVELL_LIBC__)) -#define EWOULDBLOCK (WSAEWOULDBLOCK - WSABASEERR) -#endif - -int jk_is_socket_connected(int sd, int timeout) -{ - unsigned char test_buffer[1]; - int rc; - /* Set socket to nonblocking */ - if ((rc = sononblock(sd)) != 0) - return (errno > 0) ? -errno : errno; - - rc = jk_tcp_socket_recvfull(sd, test_buffer, 1) * (-1); - soblock(sd); -#ifdef WIN32 - /* Reset socket timeouts if the new timeout differs from the old timeout */ - if (timeout > 0) { - /* Timeouts are in msec, represented as int */ - setsockopt(sd, SOL_SOCKET, SO_RCVTIMEO, - (char *) &timeout, sizeof(int)); - setsockopt(sd, SOL_SOCKET, SO_SNDTIMEO, - (char *) &timeout, sizeof(int)); - } -#endif - if (rc == EWOULDBLOCK || rc == -1) - return 1; - else - return rc; -} - -#endif 1.50 +4 -5 jakarta-tomcat-connectors/jk/native/common/jk_uri_worker_map.c Index: jk_uri_worker_map.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_uri_worker_map.c,v retrieving revision 1.49 retrieving revision 1.50 diff -u -r1.49 -r1.50 --- jk_uri_worker_map.c 21 Feb 2005 08:27:13 -0000 1.49 +++ jk_uri_worker_map.c 21 Feb 2005 11:18:48 -0000 1.50 @@ -136,7 +136,7 @@ { JK_TRACE_ENTER(l); - if (init_data && uw_map) { + if (uw_map) { int rc; *uw_map = (jk_uri_worker_map_t *)calloc(1, sizeof(jk_uri_worker_map_t)); @@ -148,8 +148,8 @@ JK_TRACE_EXIT(l); return JK_FALSE; } - - rc = uri_worker_map_open(*uw_map, init_data, l); + if (init_data) + rc = uri_worker_map_open(*uw_map, init_data, l); JK_TRACE_EXIT(l); return rc; } @@ -234,7 +234,6 @@ char *uri; unsigned int match_type = 0; unsigned int i; - int allocated = 0; JK_TRACE_ENTER(l);
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]