[ http://issues.apache.org/jira/browse/AXISCPP-847?page=all ]
nadir amra reassigned AXISCPP-847:
----------------------------------
Assign To: nadir amra
> Wrong definition of INVALID_SOCKET for non MS Windows platforms.
> ----------------------------------------------------------------
>
> Key: AXISCPP-847
> URL: http://issues.apache.org/jira/browse/AXISCPP-847
> Project: Axis-C++
> Type: Bug
> Components: Transport (axis3)
> Versions: 1.5 Final
> Environment: i5/OS (OS/400 iSeries) and *nix (Linux and others)
> Reporter: Ernst Mikkelsen
> Assignee: nadir amra
> Priority: Critical
>
> In HTTPChannel.hpp and HTTPSSLChannel.hpp, INVALID_SOCKET is defined as 0
> (zero). This causes a client using Axis C++ to fail consequently with a
> HTTPTransportException on the first connection attempt on the i5/OS, because
> 0 (zero) in fact is a valid socket descriptor on the i5/OS platform (as well
> as it is on other platforms such as Linux). This also means that real errors
> are not caught because -1 from the API is compared with to a 0 (zero).
> To my knowledge, all platforms defines socket() to return either -1 or ~0
> depending on whether socket() is implemented with a signed or unsigned return
> value.
> My suggestion would be to change the following two files:
> HTTPChannel.hpp line 56 in Axis C++ 1.5 Final
> HTTPSSLChannel.hpp line 58 in Axis C++ 1.5 Final
> from: const unsigned int INVALID_SOCKET = 0;
> to: const unsigned int INVALID_SOCKET = ~0; // for unsigned socket()
> implementations
> or: const int INVALID_SOCKET = -1; // for signed socket()
> implementations
> As a workaround for this issue, I've tried to allocate a dummy socket in my
> client program before calling any of the Axis C++ methods, causing Axis C++
> to succeed on the first connection attempt.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira