case string:tokens(ClientIn, ",") of
[CBind, UserNameAttribute, ClientNonceAttribute] when (CBind == "y") or (CBind == "n") ->
case parse_attribute(UserNameAttribute) of
+ {error, Reason} ->
+ {error, Reason};
{_, EscapedUserName} ->
case unescape_username(EscapedUserName) of
error ->
_Else ->
{error, "not-supported"}
end
- end;
- {error, Reason} ->
- {error, Reason};
- _Else ->
- {error, "bad-protocol"}
+ end
end;
_Else ->
{error, "bad-protocol"}
true ->
if
SecondChar == $= ->
- case string:substr(Attribute, 3) of
- String when is_list(String) ->
- {lists:nth(1, Attribute), String};
- _Else ->
- {error, "bad-format failed"}
- end;
+ String = string:substr(Attribute, 3),
+ {lists:nth(1, Attribute), String};
true ->
{error, "bad-format second char not equal sign"}
end;