Kaydet (Commit) b7686e41 authored tarafından Cédric Bosdonnat's avatar Cédric Bosdonnat

CMIS: fixed <wsse:Expires> output: c_str() on a temp string object isn't good

Change-Id: I7de9dd2372cd7b61a3bc03bdca0023a3bc7484bd
üst 192a0eb2
......@@ -16,6 +16,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,cmis,0))
$(eval $(call gb_UnpackedTarball_add_patches,cmis, \
libcmis/libcmis-0.3.0-warnings.patch \
libcmis/libcmis-0.3.0-win.patch \
libcmis/libcmis-0.3.0.patch \
))
ifeq ($(OS)$(COM),WNTMSC)
......
diff --git src/libcmis/ws-soap.cxx src/libcmis/ws-soap.cxx
index e8efd67..decb79a 100644
--- src/libcmis/ws-soap.cxx
+++ src/libcmis/ws-soap.cxx
@@ -279,7 +279,7 @@ string SoapRequest::createEnvelope( string& username, string& password )
boost::posix_time::ptime expires( created );
expires = expires + boost::gregorian::days( 1 );
string createdStr = libcmis::writeDateTime( created );
- xmlChar* expiresStr = BAD_CAST( libcmis::writeDateTime( expires ).c_str( ) );
+ string expiresStr = libcmis::writeDateTime( expires );
xmlTextWriterStartElement( writer, BAD_CAST( "S:Envelope" ) );
xmlTextWriterWriteAttribute( writer, BAD_CAST( "xmlns:S" ), BAD_CAST( NS_SOAP_ENV_URL ) );
@@ -296,7 +296,7 @@ string SoapRequest::createEnvelope( string& username, string& password )
xmlTextWriterWriteRaw( writer, BAD_CAST( createdStr.c_str( ) ) );
xmlTextWriterEndElement( writer ); // End of Created
xmlTextWriterStartElement( writer, BAD_CAST( "wsse:Expires" ) );
- xmlTextWriterWriteRaw( writer, expiresStr );
+ xmlTextWriterWriteRaw( writer, BAD_CAST( expiresStr.c_str() ) );
xmlTextWriterEndElement( writer ); // End of Expires
xmlTextWriterEndElement( writer ); // End of Timestamp
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment