aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cyrsasl_plain.erl11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/cyrsasl_plain.erl b/src/cyrsasl_plain.erl
index ec52b00a8..3bdcf8476 100644
--- a/src/cyrsasl_plain.erl
+++ b/src/cyrsasl_plain.erl
@@ -81,15 +81,8 @@ prepare(ClientIn) ->
_ -> error
end.
-parse(S) -> parse1(binary_to_list(S), "", []).
-
-parse1([0 | Cs], S, T) ->
- parse1(Cs, "", [list_to_binary(lists:reverse(S)) | T]);
-parse1([C | Cs], S, T) -> parse1(Cs, [C | S], T);
-%parse1([], [], T) ->
-% lists:reverse(T);
-parse1([], S, T) ->
- lists:reverse([list_to_binary(lists:reverse(S)) | T]).
+parse(S) ->
+ binary:split(S, <<0>>, [global]).
parse_domain(S) -> parse_domain1(binary_to_list(S), "", []).