Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 7372 invoked from network); 12 Dec 2007 07:59:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Dec 2007 07:59:59 -0000 Received: (qmail 87052 invoked by uid 500); 12 Dec 2007 07:59:45 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 86719 invoked by uid 500); 12 Dec 2007 07:59:44 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 86708 invoked by uid 99); 12 Dec 2007 07:59:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Dec 2007 23:59:44 -0800 X-ASF-Spam-Status: No, hits=-4.0 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [195.227.30.246] (HELO datura.kippdata.de) (195.227.30.246) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Dec 2007 07:59:23 +0000 Received: from [192.168.2.122] ([192.168.2.122]) by datura.kippdata.de (8.13.5/8.13.5) with ESMTP id lBC7xLDC022315 for ; Wed, 12 Dec 2007 08:59:22 +0100 (CET) Message-ID: <475F94DF.5000009@kippdata.de> Date: Wed, 12 Dec 2007 08:59:27 +0100 From: Rainer Jung User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Tomcat Developers List Subject: Re: svn commit: r603400 - /tomcat/connectors/trunk/jk/native/common/jk_connect.c References: <20071211225800.613DB1A9832@eris.apache.org> <475F80E1.6040306@apache.org> In-Reply-To: <475F80E1.6040306@apache.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Fixed. I noticed, that the function sblock() and sononblock() for defined(NETWARE) && defined(__NOVELL_LIBC__) use the same code as for Unix (and not as for WIN32), although in all other places it behaves like WIN32. Until before r300800 (10.06.2005, first released in 1.2.14) Netware unconditionally used a version of nb_connect(), which doesn't call soblock() or sononblock(). But in that revision Jean-Jacques Clar switched in the libc case to the win32 version of nb_connect, and so it introduces soblock() and sononblock() to Netware. I find it strange, that it uses the Unix version of those, and not the WIN32 version. Regards, Rainer Mladen Turk wrote: > rjung@apache.org wrote: >> Log: >> Add function description comments and >> switch return values of jk_is_socket_connected() >> from 0/1 to JK_FALSE/JK_TRUE. >> >> - return nr == 0 ? 0 : 1; >> + return nr == JK_FALSE ? JK_FALSE : JK_TRUE; > > >> int nr; >> if (ioctl(sock, FIONREAD, (void*)&nr) == 0) { >> - return nr == 0 ? 0 : 1; >> + return nr == JK_FALSE ? JK_FALSE : JK_TRUE; >> } > > This should actually be: > return nr == 0 ? JK_FALSE : JK_TRUE; > if you wish to return JK_TRUE/JK_FALSE > > We are testing for 0 not for JK_FALSE (which happens to be zero) > that can be defined to anything. > > Regards, > Mladen --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org