mmanders 2004/02/02 09:59:56 Modified: jk/native2/common jk_channel_socket.c Log: Fix problem with port higher than 32K. Provided by Guenter Knauf. Fixed compile problem for NetWare even though this isn't built for NetWare (or any other platform.) Revision Changes Path 1.62 +11 -5 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.61 retrieving revision 1.62 diff -u -r1.61 -r1.62 --- jk_channel_socket.c 29 Jan 2004 14:17:41 -0000 1.61 +++ jk_channel_socket.c 2 Feb 2004 17:59:56 -0000 1.62 @@ -100,7 +100,7 @@ int ndelay; struct sockaddr_in addr; char *host; - short port; /* Should be unsigned - big ports will fail */ + unsigned short port; int keepalive; int timeout; }; @@ -116,7 +116,7 @@ */ static int JK_METHOD jk2_channel_socket_resolve(jk_env_t *env, char *host, - short port, + unsigned short port, struct sockaddr_in *rc); static int JK_METHOD jk2_channel_socket_close(jk_env_t *env, jk_channel_t *ch, @@ -276,16 +276,22 @@ /** private: resolve the address on init */ -static int JK_METHOD jk2_channel_socket_resolve(jk_env_t *env, char *host, short port, +static int JK_METHOD jk2_channel_socket_resolve(jk_env_t *env, char *host, unsigned short port, struct sockaddr_in *rc) { int x; /* TODO: Should be updated for IPV6 support. */ - /* for now use the correct type, in_addr_t */ + /* for now use the correct type, in_addr_t */ + + /* except on NetWare because of MetroWerks strictness */ +#ifdef NETWARE + u_long laddr; +#else in_addr_t laddr; +#endif - rc->sin_port = htons((short)port); + rc->sin_port = htons((unsigned short)port); rc->sin_family = AF_INET; /* Check if we only have digits in the string */
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]