MXS-1929: Initialize filter in filter_alloc

Changed the filter_alloc function to fully initialize the filter. This
means that if filter_alloc returns a non-NULL pointer, the filter was
successfully loaded and an instance was successfully created.
This commit is contained in:
Markus Mäkelä
2018-07-24 08:39:57 +03:00
parent 382595a2b8
commit cea36dc7be
4 changed files with 32 additions and 65 deletions

View File

@ -40,7 +40,6 @@ void filter_add_parameter(MXS_FILTER_DEF *filter_def, const char *name, const ch
MXS_FILTER_DEF *filter_alloc(const char *name, const char *module, MXS_CONFIG_PARAMETER* params);
MXS_DOWNSTREAM *filter_apply(MXS_FILTER_DEF *filter_def, MXS_SESSION *session, MXS_DOWNSTREAM *downstream);
void filter_free(MXS_FILTER_DEF *filter_def);
bool filter_load(MXS_FILTER_DEF *filter_def);
int filter_standard_parameter(const char *name);
MXS_UPSTREAM *filter_upstream(MXS_FILTER_DEF *filter_def,
MXS_FILTER_SESSION *fsession,