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:
Esa Korhonen
2017-08-07 13:21:54 +03:00
parent f336cb63cf
commit 7ba0533cc8
21 changed files with 83 additions and 93 deletions

View File

@ -38,7 +38,7 @@
/** MXS-1026: Without MySQL protocol data structures, the NullAuth authenticator will crash. */
#include <maxscale/protocol/mysql.h>
static int null_auth_set_protocol_data(DCB *dcb, GWBUF *buf);
static bool null_auth_set_protocol_data(DCB *dcb, GWBUF *buf);
static bool null_auth_is_client_ssl_capable(DCB *dcb);
static int null_auth_authenticate(DCB *dcb);
static void null_auth_free_client_data(DCB *dcb);
@ -111,17 +111,16 @@ null_auth_authenticate(DCB *dcb)
*
* @param dcb Request handler DCB connected to the client
* @param buffer Pointer to pointer to buffer containing data from client
* @return Authentication status - always 0 to indicate success
* @return Always true
*/
static int
static bool
null_auth_set_protocol_data(DCB *dcb, GWBUF *buf)
{
/** MXS-1026: This will just prevent a crash when the NullAuth authenticator
* is used. This does not provide a way to use MaxScale with no authentication. */
dcb->data = calloc(1, sizeof(MYSQL_session));
dcb->protocol = mysql_protocol_init(dcb, dcb->fd);
return 0;
return true;
}
/**