You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sa...@apache.org on 2004/04/05 16:09:05 UTC

cvs commit: ws-axis/c/src/transport/axis Channel.cpp AxisTransport.cpp

sanjaya     2004/04/05 07:09:05

  Modified:    c/src/transport/axis Channel.cpp AxisTransport.cpp
  Log:
  modifications to fix crash when parsing with xerces
  
  Revision  Changes    Path
  1.13      +1 -1      ws-axis/c/src/transport/axis/Channel.cpp
  
  Index: Channel.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/transport/axis/Channel.cpp,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Channel.cpp	1 Apr 2004 14:38:07 -0000	1.12
  +++ Channel.cpp	5 Apr 2004 14:09:05 -0000	1.13
  @@ -245,7 +245,7 @@
           }
   
           int nByteRecv = 0;
  -        const int BUF_SIZE = 512;
  +        const int BUF_SIZE = 1024;
           char buf[BUF_SIZE];
   
           if ((nByteRecv = recv(m_Sock, (char *) &buf, BUF_SIZE - 1, 0)) 
  
  
  
  1.22      +9 -1      ws-axis/c/src/transport/axis/AxisTransport.cpp
  
  Index: AxisTransport.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/transport/axis/AxisTransport.cpp,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- AxisTransport.cpp	1 Apr 2004 14:38:07 -0000	1.21
  +++ AxisTransport.cpp	5 Apr 2004 14:09:05 -0000	1.22
  @@ -210,16 +210,24 @@
   
   AXIS_TRANSPORT_STATUS AxisTransport::Get_bytes(const char** res, int* retsize, const void* pSStream)
   {
  -    	const char* strReceive =  m_pReceiver->Recv();
  +    const char* strReceive =  m_pReceiver->Recv();
   	if (strReceive)
   	{
  +#ifdef USE_XERCES_PARSER
  +		char* pBuffer = const_cast<char*>(*res);
  +		strcpy(pBuffer, strReceive);
  +#else
   		*res = strReceive;
  +#endif
   		*retsize = strlen(strReceive);
   		return TRANSPORT_IN_PROGRESS;
   	}
   	else
   	{
  +#ifdef USE_XERCES_PARSER
  +#else
   		*res = NULL;
  +#endif
   		*retsize = 0;
   		return TRANSPORT_FINISHED;
   	}