|
@@ -179,8 +179,7 @@ auth({$R, <<M:?int32, _/binary>>}, State) ->
|
|
_ -> Method = unknown
|
|
_ -> Method = unknown
|
|
end,
|
|
end,
|
|
Error = {error, {unsupported_auth_method, Method}},
|
|
Error = {error, {unsupported_auth_method, Method}},
|
|
- %% TODO send error response
|
|
|
|
- {stop, Error, State};
|
|
|
|
|
|
+ {stop, Error, reply(State, Error)};
|
|
|
|
|
|
%% ErrorResponse
|
|
%% ErrorResponse
|
|
%% TODO who decodes error ?
|
|
%% TODO who decodes error ?
|
|
@@ -190,12 +189,12 @@ auth({error, E}, State) ->
|
|
<<"28P01">> -> Why = invalid_password;
|
|
<<"28P01">> -> Why = invalid_password;
|
|
Any -> Why = Any
|
|
Any -> Why = Any
|
|
end,
|
|
end,
|
|
- %% TODO send error response
|
|
|
|
- {stop, {error, Why}, State};
|
|
|
|
|
|
+ Error = {error, Why},
|
|
|
|
+ {stop, Error, reply(State, Error)};
|
|
|
|
|
|
auth(timeout, State) ->
|
|
auth(timeout, State) ->
|
|
- %% TODO send error response
|
|
|
|
- {stop, {error, timeout}, State}.
|
|
|
|
|
|
+ Error = {error, timeout},
|
|
|
|
+ {stop, Error, reply(State, Error)}.
|
|
|
|
|
|
initializing(timeout, State) ->
|
|
initializing(timeout, State) ->
|
|
%% TODO send error response
|
|
%% TODO send error response
|