Bug 101352 - [patch] devel/gsoap: FD_SETSIZE checking is wrong: some client apps dont work
Summary: [patch] devel/gsoap: FD_SETSIZE checking is wrong: some client apps dont work
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Sergey Matveychuk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-04 11:10 UTC by Šimun Mikecin
Modified: 2006-08-07 08:10 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (749 bytes, patch)
2006-08-04 11:10 UTC, Šimun Mikecin
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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