Return-Path: Delivered-To: apmail-ws-axis-cvs-archive@www.apache.org Received: (qmail 72647 invoked from network); 4 Jan 2005 18:26:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 4 Jan 2005 18:26:37 -0000 Received: (qmail 11892 invoked by uid 500); 4 Jan 2005 18:26:30 -0000 Delivered-To: apmail-ws-axis-cvs-archive@ws.apache.org Received: (qmail 11839 invoked by uid 500); 4 Jan 2005 18:26:29 -0000 Mailing-List: contact axis-cvs-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-cvs@ws.apache.org Received: (qmail 11806 invoked by uid 99); 4 Jan 2005 18:26:28 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Tue, 04 Jan 2005 10:26:25 -0800 Received: (qmail 72502 invoked by uid 1876); 4 Jan 2005 18:26:24 -0000 Date: 4 Jan 2005 18:26:24 -0000 Message-ID: <20050104182624.72501.qmail@minotaur.apache.org> From: hawkeye@apache.org To: ws-axis-cvs@apache.org Subject: cvs commit: ws-axis/c/src/transport/axis2/ipv6 IPV6Channel.cpp X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N hawkeye 2005/01/04 10:26:24 Modified: c/src/transport/axis2 Axis2Transport.cpp Channel.cpp Channel.h c/src/transport/axis2/ipv6 IPV6Channel.cpp Log: Added better error messages to AxisTransport2 when it fails to get a connection. This message is put into the Exception. this is a stop-gap as this sort of function should be standard on all. platforms (I've only implemented on windows) and available through the Platform specific macros/classes. Revision Changes Path 1.35 +2 -2 ws-axis/c/src/transport/axis2/Axis2Transport.cpp Index: Axis2Transport.cpp =================================================================== RCS file: /home/cvs/ws-axis/c/src/transport/axis2/Axis2Transport.cpp,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- Axis2Transport.cpp 4 Jan 2005 10:39:35 -0000 1.34 +++ Axis2Transport.cpp 4 Jan 2005 18:26:23 -0000 1.35 @@ -201,11 +201,11 @@ m_bReopenConnection = false; if (!m_pChannel->open ()) { - int iStringLength = m_pChannel->GetLastError ().length () + 1; + int iStringLength = m_pChannel->GetLastErrorMsg ().length () + 1; const char *pszLastError = new char[iStringLength]; memcpy ((void *) pszLastError, - m_pChannel->GetLastError ().c_str (), iStringLength); + m_pChannel->GetLastErrorMsg ().c_str (), iStringLength); ; throw 1.11 +34 -114 ws-axis/c/src/transport/axis2/Channel.cpp Index: Channel.cpp =================================================================== RCS file: /home/cvs/ws-axis/c/src/transport/axis2/Channel.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- Channel.cpp 22 Dec 2004 09:23:10 -0000 1.10 +++ Channel.cpp 4 Jan 2005 18:26:24 -0000 1.11 @@ -35,26 +35,17 @@ */ Channel::Channel ():m_Sock (INVALID_SOCKET), m_iMsgLength( 0), m_sMsg(NULL), m_lTimeoutSeconds(0) { -#ifdef FJPDebug -printf( ">Channel::Channel()\n"); -#endif #ifdef WIN32 m_lTimeoutSeconds = 10; #endif -#ifdef FJPDebug -printf( "Channel::~Channel()\n"); -#endif // If the socket value is not invalid, then close the socket before // deleting the Channel object. @@ -66,9 +57,6 @@ if (m_sMsg) delete [] m_sMsg; -#ifdef FJPDebug -printf( "Channel::setURL( const char* cpURL=%s)\n", cpURL); -#endif // Set the Channel URL to the new value. // NB: This will cause problems if the new URL is diferent in type from the @@ -88,9 +73,6 @@ // problems will occur because each type operates differently. m_URL.setURL( cpURL); -#ifdef FJPDebug -printf( "Channel::getURL()\n"); -#endif -#ifdef FJPDebug -printf( "Channel::open()\n"); -#endif // if there is an open socket already, close it first if (m_Sock != INVALID_SOCKET) closeChannel(); @@ -138,9 +111,6 @@ // then thrown an exeption. if( !Init()) { -#ifdef FJPDebug -printf( "Channel::Init()\n"); -#endif #ifdef WIN32 WSADATA wsaData; // Contains vendor-specific information, such as the @@ -267,10 +256,6 @@ // mechanism. m_LastErr = "WinSock DLL not responding."; -#ifdef FJPDebug -printf( "Channel::operator << msg=%s, ", msg); -#endif // Check that the Tx/Rx sockets are valid (this will have been done if the // application has called the open method first. @@ -341,9 +317,6 @@ { // Error - Writing cannot be done without having a open socket to // remote end. Throw an exception. -#ifdef FJPDebug -printf( "> (std::string & msg) { -#ifdef FJPDebug -printf( ">Channel::operator >> m_Sock=%d\n", m_Sock); -#endif msg = ""; @@ -411,9 +370,6 @@ // streaming error on undefined channel; please open the // channel first -#ifdef FJPDebug -printf( "> exception=SERVER_TRANSPORT_INVALID_SOCKET\n"); -#endif throw AxisTransportException( SERVER_TRANSPORT_INVALID_SOCKET); } @@ -445,9 +401,6 @@ { // Error -#ifdef FJPDebug -printf( "> exception=SERVER_TRANSPORT_TIMEOUT_EXCEPTION\n"); -#endif // Select SOCKET_ERROR. Channel error while waiting for timeout throw AxisTransportException( SERVER_TRANSPORT_TIMEOUT_EXCEPTION, @@ -459,9 +412,6 @@ // Timeout expired - select timeout expired. // Channel error connection timeout before receving -#ifdef FJPDebug -printf( "> exception=SERVER_TRANSPORT_TIMEOUT_EXPIRED\n"); -#endif throw AxisTransportException( SERVER_TRANSPORT_TIMEOUT_EXPIRED, "Channel error: connection timed out before receving"); @@ -474,9 +424,6 @@ // Recv SOCKET_ERROR, Channel error while getting data /* closeChannel(); */ -#ifdef FJPDebug -printf( "> exception=SERVER_TRANSPORT_INPUT_STREAMING_ERROR\n"); -#endif throw AxisTransportException( SERVER_TRANSPORT_INPUT_STREAMING_ERROR, "Channel error while getting data"); @@ -512,12 +459,6 @@ ;//printf ("execution break\n"); } -#ifdef FJPDebug -hexOutput( m_sMsg, m_iMsgLength); - -printf( "m_iMsgLength=%d\n", m_iMsgLength); -printf( "> msg = %s\n", buf); -#endif return *this; } @@ -602,15 +543,9 @@ */ void Channel::closeChannel () { -#ifdef FJPDebug -printf( ">Channel::closeChannel()\n"); -#endif if( INVALID_SOCKET == m_Sock) // Check if socket already closed : AXISCPP-185 { -#ifdef FJPDebug -printf( "Channel::setTimeout(const long lSeconds=%d)\n", lSeconds); -#endif m_lTimeoutSeconds = lSeconds; -#ifdef FJPDebug -printf( "Channel::applyTimeout()\n"); -#endif fd_set set; struct timeval timeout; @@ -685,9 +608,6 @@ timeout.tv_usec = 0; /* select returns 0 if timeout, 1 if input available, -1 if error. */ -#ifdef FJPDebug -printf( "IPV6Channel::IPV6Channel()\n"); -#endif #ifdef WIN32 - m_lTimeoutSeconds = 10; #endif - -#ifdef FJPDebug - printf( "IPV6Channel::~IPV6Channel()\n"); -#endif - // If the socket value is not invalid, then close the socket before // deleting the IPV6Channel object. if( m_Sock != INVALID_SOCKET) @@ -56,9 +44,6 @@ closeChannel(); } -#ifdef FJPDebug - printf( "IPV6Channel::open()\n"); -#endif // if there is an open socket already, close it first if (m_Sock != INVALID_SOCKET) closeChannel(); @@ -91,10 +73,6 @@ // then thrown an exeption. if( !init()) { -#ifdef FJPDebug - printf( "ai_family, addrInfo->ai_socktype, addrInfo->ai_protocol); if (m_Sock < 0) { -#ifdef FJPDebug - fprintf(stderr, "socket() faild: %d\n", m_Sock); -#endif continue; } @@ -136,9 +108,6 @@ // channel and then throw an exception. closeChannel(); -#ifdef FJPDebug - printf( "IPV6Channel::init()\n"); -#endif #ifdef WIN32 @@ -209,9 +168,6 @@ // mechanism. m_LastErr = "WinSock DLL not addrInfoponding."; -#ifdef FJPDebug - printf( "