Bug 101352

Summary: [patch] devel/gsoap: FD_SETSIZE checking is wrong: some client apps dont work
Product: Ports & Packages Reporter: Šimun Mikecin <numisemis>
Component: Individual Port(s)Assignee: Sergey Matveychuk <sem>
Status: Closed FIXED    
Severity: Affects Only Me CC: sem
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Šimun Mikecin 2006-08-04 11:10:10 UTC
gsoap 2.7.8c has file descriptor checking like this:
        if ((int)soap->socket > FD_SETSIZE)
          return SOAP_FD_EXCEEDED;      /* Hint: MUST increase FD_SETSIZE */
and on FreeBSD FD_SETSIZE is defined in /usr/include/sys/select.h like this:
#define FD_SETSIZE      1024U
unlike many other systems where it doesn't have 'U' suffix which makes it an "unsigned" type.

Problem is that comparing:
	if ((int) -1 > 1024U)
returns true, so the function call fails, but it shouldn't cause soap->socket initially has a value of -1.

I already reported this bug on the gsoap project tracker.

How-To-Repeat: As a consequence of this bug, I have experienced that SOAP calls from client
SOAP applications in some situations (like using HTTP keep-alive and one-way
message parsing) return with SOAP_FD_EXCEEDED instead of SOAP_OK.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2006-08-04 12:07:29 UTC
Responsible Changed
From-To: freebsd-ports-bugs->sem

Over to maintainer
Comment 2 Sergey Matveychuk freebsd_committer freebsd_triage 2006-08-05 09:31:27 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 3 Šimun Mikecin 2006-08-07 08:06:21 UTC
Unfortunatelly with this commit it doesn't build on
6.x anymore. I suppose the problem is with this part
of the Makefile (which was not in the PR):

+.if ${OSVERSION} < 500000
+CONST=
+.else
+CONST= const
+.endif


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com