You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by wh...@apache.org on 2005/07/21 15:45:09 UTC

cvs commit: ws-axis/c/tests/auto_build/testcases/output DynUnrefAttachmentTest.expected

whitlock    2005/07/21 06:45:09

  Modified:    c/src/soap SoapAttachment.cpp SoapAttachmentHeaders.cpp
                        SoapAttachmentHeaders.hpp
               c/tests/auto_build/testcases/output
                        DynUnrefAttachmentTest.expected
  Log:
  Fix attachments tests on AIX by returning a const char* instead of a string from SoapAttachmentHeaders::getHeader, so that when SoapAttachment::getHeader returns it, it will not go out of scope.
  
  Revision  Changes    Path
  1.21      +1 -4      ws-axis/c/src/soap/SoapAttachment.cpp
  
  Index: SoapAttachment.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/soap/SoapAttachment.cpp,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- SoapAttachment.cpp	14 Jul 2005 13:18:39 -0000	1.20
  +++ SoapAttachment.cpp	21 Jul 2005 13:45:09 -0000	1.21
  @@ -115,10 +115,7 @@
   
   const char* SoapAttachment::getHeader(const char *pchName)
   {
  -	if (m_AttachmentHeaders->getHeader(pchName).empty())
  -		return "";
  -	else
  -		return m_AttachmentHeaders->getHeader(pchName).c_str();
  +	return m_AttachmentHeaders->getHeader(pchName);
   }
   
   const char* SoapAttachment::getAttachmentId()
  
  
  
  1.5       +2 -2      ws-axis/c/src/soap/SoapAttachmentHeaders.cpp
  
  Index: SoapAttachmentHeaders.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/soap/SoapAttachmentHeaders.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SoapAttachmentHeaders.cpp	30 Jun 2005 11:19:01 -0000	1.4
  +++ SoapAttachmentHeaders.cpp	21 Jul 2005 13:45:09 -0000	1.5
  @@ -78,14 +78,14 @@
   	}
   }
   
  -AxisString SoapAttachmentHeaders::getHeader(AxisString sName)
  +const char *SoapAttachmentHeaders::getHeader(AxisString sName)
   {
   
   	for (unsigned int i = 0; i < m_AttachHeaders.size (); i++)
   	{
   		if (m_AttachHeaders[i].first == AXIS_CONTENT_ID)
   		{
  -			return m_AttachHeaders[i].second;
  +			return m_AttachHeaders[i].second.c_str();
   		}
   	}
   
  
  
  
  1.2       +1 -1      ws-axis/c/src/soap/SoapAttachmentHeaders.hpp
  
  Index: SoapAttachmentHeaders.hpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/soap/SoapAttachmentHeaders.hpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SoapAttachmentHeaders.hpp	15 Jun 2005 13:37:31 -0000	1.1
  +++ SoapAttachmentHeaders.hpp	21 Jul 2005 13:45:09 -0000	1.2
  @@ -55,7 +55,7 @@
   	vector < pair < AxisString, AxisString > > m_AttachHeaders;
   
   public:
  -	AxisString getHeader(AxisString sName);
  +	const char *getHeader(AxisString sName);
   	void serialize(SoapSerializer& pSZ);
   	void addHeader(AxisString name, AxisString value);
   	SoapAttachmentHeaders();
  
  
  
  1.4       +1 -1      ws-axis/c/tests/auto_build/testcases/output/DynUnrefAttachmentTest.expected
  
  Index: DynUnrefAttachmentTest.expected
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/output/DynUnrefAttachmentTest.expected,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DynUnrefAttachmentTest.expected	6 Jul 2005 10:31:40 -0000	1.3
  +++ DynUnrefAttachmentTest.expected	21 Jul 2005 13:45:09 -0000	1.4
  @@ -2,7 +2,7 @@
   i=1
   i=2
   i=3
  -AxisSoapException:Content is not unique within the MIME message 
  +AxisSoapException:Content is not unique within the MIME message
   i=4
   Invoking...
   ----------------------------TEST COMPLETE--------------------------------