Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@www.apache.org Received: (qmail 4239 invoked from network); 2 Feb 2004 17:32:09 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 2 Feb 2004 17:32:09 -0000 Received: (qmail 17021 invoked by uid 500); 2 Feb 2004 17:29:55 -0000 Delivered-To: apmail-jakarta-tomcat-dev-archive@jakarta.apache.org Received: (qmail 16932 invoked by uid 500); 2 Feb 2004 17:29:55 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 16804 invoked from network); 2 Feb 2004 17:29:53 -0000 Received: from unknown (HELO mail.gmx.net) (213.165.64.20) by daedalus.apache.org with SMTP; 2 Feb 2004 17:29:53 -0000 Received: (qmail 31288 invoked by uid 65534); 2 Feb 2004 17:29:33 -0000 Received: from p50925765.dip.t-dialin.net (EHLO wstst06) (80.146.87.101) by mail.gmx.net (mp022) with SMTP; 02 Feb 2004 18:29:33 +0100 X-Authenticated: #1766531 Date: Mon, 2 Feb 2004 18:29:26 +0100 From: =?ISO-8859-1?Q?G=FCnter_Knauf?= Reply-To: =?ISO-8859-1?Q?G=FCnter_Knauf?= To: tomcat-dev@jakarta.apache.org Subject: Re: [PATCH] ./native2/common/jk_channel_apr_socket.c - use apr_port_t instead of short for port Message-ID: References: <401E2D5E.2040506@apache.org> <401E8420.7070902@apache.org> X-Mailer: AK-Mail 3.5 [ger] (registered, single user license) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi Henri, >> Do you know what's about the ./native2/common/jk_channel_socket.c file? >> Does soemone still use it since APR is now mandatory, or can we remove >> it? >>If it stays then we should also patch the port there to 'unsigned >>short'... > Yes, it should be removed but the conservative approach will be to > have a patch for unsigned short here we go: http://www.gknw.com/test/jk_channel_socket.c.diff ======================================================================== # Patch to solve http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17579 # --- ./jk/native2/common/jk_channel_socket.c.origThu Jan 29 18:23:28 2004 +++ ./jk/native2/common/jk_channel_socket.cMon Feb 02 18:19:28 2004 @@ -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,7 +276,8 @@ /** 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; @@ -285,7 +286,7 @@ /* for now use the correct type, in_addr_t */ in_addr_t laddr; - 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 */ Guenter. --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org