Add missing error messages
If tee filter creation fails, it would not log an error message.
This commit is contained in:
parent
c04073a96c
commit
9c08d78304
@ -420,6 +420,7 @@ filter_apply(MXS_FILTER_DEF *filter, MXS_SESSION *session, MXS_DOWNSTREAM *downs
|
||||
|
||||
if ((me = (MXS_DOWNSTREAM *)MXS_CALLOC(1, sizeof(MXS_DOWNSTREAM))) == NULL)
|
||||
{
|
||||
MXS_OOM();
|
||||
return NULL;
|
||||
}
|
||||
me->instance = filter->filter;
|
||||
@ -427,6 +428,7 @@ filter_apply(MXS_FILTER_DEF *filter, MXS_SESSION *session, MXS_DOWNSTREAM *downs
|
||||
|
||||
if ((me->session = filter->obj->newSession(me->instance, session)) == NULL)
|
||||
{
|
||||
MXS_ERROR("Failed to create filter session for '%s'", filter->name);
|
||||
MXS_FREE(me);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -628,6 +628,7 @@ session_setup_filters(MXS_SESSION *session)
|
||||
if ((session->filters = (SESSION_FILTER*)MXS_CALLOC(service->n_filters,
|
||||
sizeof(SESSION_FILTER))) == NULL)
|
||||
{
|
||||
MXS_OOM();
|
||||
return 0;
|
||||
}
|
||||
session->n_filters = service->n_filters;
|
||||
|
@ -98,6 +98,7 @@ TeeSession* TeeSession::create(Tee* my_instance, MXS_SESSION* session)
|
||||
if ((match && (md_match = pcre2_match_data_create_from_pattern(match, NULL)) == NULL) ||
|
||||
(exclude && (md_exclude = pcre2_match_data_create_from_pattern(exclude, NULL)) == NULL))
|
||||
{
|
||||
MXS_OOM();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -105,6 +106,9 @@ TeeSession* TeeSession::create(Tee* my_instance, MXS_SESSION* session)
|
||||
(MySQLProtocol*)session->client_dcb->protocol,
|
||||
my_instance->get_service())) == NULL)
|
||||
{
|
||||
MXS_ERROR("Failed to create local client connection to '%s'%s",
|
||||
my_instance->get_service()->name,
|
||||
my_instance->get_service()->ports ? "" : ": Service has no network listeners");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user