Authenticator API extract-entrypoint returns bool
Extraction either succeeds or fails, it does not need to return defined integer values.
This commit is contained in:
@ -343,9 +343,7 @@ mxs_auth_state_t handle_server_response(DCB *dcb, GWBUF *buffer)
|
||||
mxs_auth_state_t rval = proto->protocol_auth_state == MXS_AUTH_STATE_CONNECTED ?
|
||||
MXS_AUTH_STATE_HANDSHAKE_FAILED : MXS_AUTH_STATE_FAILED;
|
||||
|
||||
int rc = dcb->authfunc.extract(dcb, buffer);
|
||||
|
||||
if (rc == MXS_AUTH_SUCCEEDED || rc == MXS_AUTH_INCOMPLETE)
|
||||
if (dcb->authfunc.extract(dcb, buffer))
|
||||
{
|
||||
switch (dcb->authfunc.authenticate(dcb))
|
||||
{
|
||||
|
@ -658,9 +658,8 @@ gw_read_do_authentication(DCB *dcb, GWBUF *read_buffer, int nbytes_read)
|
||||
* data extraction succeeds, then a call is made to the actual
|
||||
* authenticate function to carry out the user checks.
|
||||
*/
|
||||
int auth_val = dcb->authfunc.extract(dcb, read_buffer);
|
||||
|
||||
if (MXS_AUTH_SUCCEEDED == auth_val)
|
||||
int auth_val = MXS_AUTH_FAILED;
|
||||
if (dcb->authfunc.extract(dcb, read_buffer))
|
||||
{
|
||||
auth_val = dcb->authfunc.authenticate(dcb);
|
||||
}
|
||||
|
Reference in New Issue
Block a user