Samisa Abeysinghe wrote:
Kaushalye,
Please let the users know that you have done this change.
I comment on the JIRA issue[1]. Anyways will drop a mail too.
I think there was a mail on the user list on if this change would
be done or now as well as how to use this function.
No diversion from the earlier approach. Changes are internal to the
function.
-Kaushalye
[1]https://issues.apache.org/jira/browse/AXIS2C-731
Thanks,
Samisa...
-------- Original Message --------
Subject: svn commit: r590625 -
/webservices/axis2/trunk/c/util/src/base64.c
Date: Wed, 31 Oct 2007 11:24:56 -0000
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Author: kaushalye
Date: Wed Oct 31 04:24:55 2007
New Revision: 590625
URL: http://svn.apache.org/viewvc?rev=590625&view=rev
Log:
New implementation for axutil_base64_decode_len.
JIRA issue : AXIS2C-731
Modified:
webservices/axis2/trunk/c/util/src/base64.c
Modified: webservices/axis2/trunk/c/util/src/base64.c
URL:
http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/base64.c?rev=590625&r1=590624&r2=590625&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/base64.c (original)
+++ webservices/axis2/trunk/c/util/src/base64.c Wed Oct 31 04:24:55 2007
@@ -94,7 +94,7 @@
axutil_base64_decode_len(
const char *bufcoded)
{
- int nbytesdecoded;
+ int nbytesdecoded;
register const unsigned char *bufin;
register int nprbytes;
@@ -102,9 +102,12 @@
while (pr2six[*(bufin++)] <= 63);
nprbytes = (bufin - (const unsigned char *) bufcoded) - 1;
- nbytesdecoded = ((nprbytes + 3) / 4) * 3;
- return nbytesdecoded + 1;
+ nbytesdecoded = ((nprbytes >> 2) * 3);
+
+ if (nprbytes & 0x03) nbytesdecoded += (nprbytes & 0x03) - 1;
+
+ return nbytesdecoded; }
AXIS2_EXTERN int AXIS2_CALL
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
http://blog.kaushalye.org/
http://wso2.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]