You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by Sanjiva Weerawarana <sa...@opensource.lk> on 2004/04/02 19:20:03 UTC
Re: Code freeze for Axis C++ version 1.1 : Fixes
+1 for committing these fixes.
Sanjiva.
----- Original Message -----
From: "Jean-Yves Baudy" <jy...@free.fr>
To: <ax...@ws.apache.org>
Sent: Friday, April 02, 2004 11:43 PM
Subject: Code freeze for Axis C++ version 1.1 : Fixes
> Hi all,
>
> I'm sorry do don't respect the protocol. But my time is very consuming.
> So here patch against the freeze code. That solve binary64 issues :
>
> BasicTypeSerializer.cpp
> - fix segfault if size is zero (HexBinary/Base64Binary)
> - pass the real size to apr_base64_encode_binary()
>
> SoapDeSerializer.cpp
> - put the real decoded size to value.__size
>
> apr_base64.c
> - put '\0' at the end of the string
>
> Receiver.cpp
> - remove a printf
>
>
> If you're agree I can commit this code on Monday.
>
> Regards,
>
> Jean-Yves
>
----------------------------------------------------------------------------
----
> --- c/src/common/BasicTypeSerializer.cpp Thu Apr 1 13:42:59 2004
> +++ src/common/BasicTypeSerializer.cpp Fri Apr 2 00:24:29 2004
> @@ -186,6 +186,13 @@
>
> const AxisChar* BasicTypeSerializer::EncodeToHexBinary(const
xsd__hexBinary* pBinary)
> {
> + if ( pBinary->__size == 0 ) {
> + char *outstr = (char*) malloc(1);
> + outstr[0]='\0';
> + m_AuxStr = outstr;
> + free(outstr);
> + return m_AuxStr.c_str();
> + }
> char *outstr = (char*) malloc(pBinary->__size*2);
> Hex_Encode(outstr, pBinary->__ptr, pBinary->__size);
> m_AuxStr = outstr;
> @@ -195,9 +202,16 @@
>
> const AxisChar* BasicTypeSerializer::EncodeToBase64Binary(const
xsd__base64Binary* pBinary)
> {
> + if ( pBinary->__size == 0 ) {
> + char *outstr = (char*) malloc(1);
> + outstr[0]='\0';
> + m_AuxStr = outstr;
> + free(outstr);
> + return m_AuxStr.c_str();
> + }
> int len = apr_base64_encode_len(pBinary->__size);
> char *outstr = (char*) malloc(len);
> - apr_base64_encode_binary(outstr, pBinary->__ptr, len);
> + apr_base64_encode_binary(outstr, pBinary->__ptr, pBinary->__size);
> m_AuxStr = outstr;
> free(outstr);
> return m_AuxStr.c_str();
> --- c/src/soap/SoapDeSerializer.cpp Thu Apr 1 09:16:30 2004
> +++ src/soap/SoapDeSerializer.cpp Thu Apr 1 23:19:24 2004
> @@ -2024,7 +2024,7 @@
> {
> xsd__base64Binary value;
> value.__ptr = (unsigned char*) malloc(strlen(pValue)*2);
> - value.__size = apr_base64_decode_len(pValue);
> + value.__size = /*apr_base64_decode_len(pValue);*/
> apr_base64_decode_binary(value.__ptr, pValue);
> return value;
> }
> --- c/src/soap/apr_base64.c Wed Mar 31 13:49:00 2004
> +++ src/soap/apr_base64.c Fri Apr 2 11:22:15 2004
> @@ -226,6 +226,7 @@
> }
>
> nbytesdecoded -= (4 - nprbytes) & 3;
> + bufplain[nbytesdecoded]='\0';
> return nbytesdecoded;
> }
>
> --- c/src/transport/axis/Receiver.cpp Fri Apr 2 09:26:41 2004
> +++ src/transport/axis/Receiver.cpp Fri Apr 2 11:30:37 2004
> @@ -89,7 +89,6 @@
> {
> try
> {
> - printf("try\n");
> *m_pTrChannel >> (&m_pMsg);
> if(m_pMsg == NULL)
> {
>
>