25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-30 16:36:29 +01:00

* src/jlib.erl: Fix recursive call to speedup base64

decoding (thanks to Jeffrey Rogiers)(EJAB-333)

SVN Revision: 2041
This commit is contained in:
Badlop 2009-04-27 19:17:17 +00:00
parent fd5e312ed9
commit 028509c3a9
2 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2009-04-27 Badlop <badlop@process-one.net>
* src/jlib.erl: Fix recursive call to speedup base64
decoding (thanks to Jeffrey Rogiers)(EJAB-333)
2009-04-24 Christophe Romain <christophe.romain@process-one.net>
* src/odbc/ejabberd_odbc.erl: allow to run query bloc as erlang

View File

@ -297,7 +297,7 @@ decode1_base64([Sextet1,Sextet2,$=,$=|Rest]) ->
(d(Sextet1) bsl 18) bor
(d(Sextet2) bsl 12),
Octet1=Bits2x6 bsr 16,
[Octet1|decode_base64(Rest)];
[Octet1|decode1_base64(Rest)];
decode1_base64([Sextet1,Sextet2,Sextet3,$=|Rest]) ->
Bits3x6=
(d(Sextet1) bsl 18) bor
@ -305,7 +305,7 @@ decode1_base64([Sextet1,Sextet2,Sextet3,$=|Rest]) ->
(d(Sextet3) bsl 6),
Octet1=Bits3x6 bsr 16,
Octet2=(Bits3x6 bsr 8) band 16#ff,
[Octet1,Octet2|decode_base64(Rest)];
[Octet1,Octet2|decode1_base64(Rest)];
decode1_base64([Sextet1,Sextet2,Sextet3,Sextet4|Rest]) ->
Bits4x6=
(d(Sextet1) bsl 18) bor
@ -315,7 +315,7 @@ decode1_base64([Sextet1,Sextet2,Sextet3,Sextet4|Rest]) ->
Octet1=Bits4x6 bsr 16,
Octet2=(Bits4x6 bsr 8) band 16#ff,
Octet3=Bits4x6 band 16#ff,
[Octet1,Octet2,Octet3|decode_base64(Rest)];
[Octet1,Octet2,Octet3|decode1_base64(Rest)];
decode1_base64(_CatchAll) ->
"".