MXS-2196: Move DCB initialization into DCB constructor
More of the DCB initialization is now done in the DCB constructor. This makes the creation of new DCBs simpler but it can be even simpler. By passing the file descriptor that the DCB should use into the constructor almost all of the initialization would be done inside it. Also removed the unused path member variable.
This commit is contained in:
@ -332,26 +332,13 @@ static int mysql_auth_authenticate(DCB* dcb)
|
||||
strcpy(extra, "Wrong password.");
|
||||
}
|
||||
|
||||
if (dcb->path)
|
||||
{
|
||||
MXS_LOG_EVENT(maxscale::event::AUTHENTICATION_FAILURE,
|
||||
"%s: login attempt for user '%s'@[%s]:%s, authentication failed. %s",
|
||||
dcb->service->name,
|
||||
client_data->user,
|
||||
dcb->remote,
|
||||
dcb->path,
|
||||
extra);
|
||||
}
|
||||
else
|
||||
{
|
||||
MXS_LOG_EVENT(maxscale::event::AUTHENTICATION_FAILURE,
|
||||
"%s: login attempt for user '%s'@[%s]:%d, authentication failed. %s",
|
||||
dcb->service->name,
|
||||
client_data->user,
|
||||
dcb->remote,
|
||||
dcb_get_port(dcb),
|
||||
extra);
|
||||
}
|
||||
MXS_LOG_EVENT(maxscale::event::AUTHENTICATION_FAILURE,
|
||||
"%s: login attempt for user '%s'@[%s]:%d, authentication failed. %s",
|
||||
dcb->service->name,
|
||||
client_data->user,
|
||||
dcb->remote,
|
||||
dcb_get_port(dcb),
|
||||
extra);
|
||||
|
||||
if (is_localhost_address(&dcb->ip)
|
||||
&& !dcb->service->localhost_match_wildcard_host)
|
||||
|
Reference in New Issue
Block a user