tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <rainer.j...@kippdata.de>
Subject Re: svn commit: r603400 - /tomcat/connectors/trunk/jk/native/common/jk_connect.c
Date Wed, 12 Dec 2007 07:59:27 GMT
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


Mime
View raw message