Return-Path: Delivered-To: apmail-ws-axis-c-dev-archive@www.apache.org Received: (qmail 24115 invoked from network); 12 Oct 2005 02:51:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 12 Oct 2005 02:51:27 -0000 Received: (qmail 75893 invoked by uid 500); 12 Oct 2005 02:51:27 -0000 Delivered-To: apmail-ws-axis-c-dev-archive@ws.apache.org Received: (qmail 75876 invoked by uid 500); 12 Oct 2005 02:51:26 -0000 Mailing-List: contact axis-c-dev-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: "Apache AXIS C Developers List" Reply-To: "Apache AXIS C Developers List" Delivered-To: mailing list axis-c-dev@ws.apache.org Received: (qmail 75865 invoked by uid 99); 12 Oct 2005 02:51:26 -0000 X-ASF-Spam-Status: No, hits=1.3 required=10.0 tests=SPF_FAIL X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Oct 2005 19:51:26 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 589F2512 for ; Wed, 12 Oct 2005 04:51:05 +0200 (CEST) Message-ID: <659823007.1129085465340.JavaMail.jira@ajax.apache.org> Date: Wed, 12 Oct 2005 04:51:05 +0200 (CEST) From: "nadir amra (JIRA)" To: axis-c-dev@ws.apache.org Subject: [jira] Closed: (AXISCPP-847) Wrong definition of INVALID_SOCKET for non MS Windows platforms. In-Reply-To: <2101824990.1128419027496.JavaMail.jira@ajax.apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/AXISCPP-847?page=all ] nadir amra closed AXISCPP-847: ------------------------------ Fix Version: 1.6 Alpha Resolution: Fixed In UNIX implementations, socket descriptor is integer. So I made the following changes in HTTPChannel.hpp and HTTPSSLChannel.hpp: const int INVALID_SOCKET = -1; The above use to be unsigned with value of 0. #ifdef WIN32 unsigned #endif int m_Sock; // Socket descriptor > 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 > Fix For: 1.6 Alpha > > 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