Use module parameters in mqfilter

Cleaned up mqfilter createInstance and converted it to use module
parameters.
This commit is contained in:
Markus Mäkelä
2017-01-08 14:50:54 +02:00
parent dd372cda17
commit 9b2d382232
3 changed files with 112 additions and 256 deletions

View File

@ -270,6 +270,22 @@ const char* config_get_string(const CONFIG_PARAMETER *params, const char *key);
*/
int config_get_enum(const CONFIG_PARAMETER *params, const char *key, const MXS_ENUM_VALUE *values);
/**
* @brief Get copy of parameter value if it is defined
*
* If a parameter with the name of @c key is defined in @c params, a copy of the
* value of that parameter is returned. The caller must free the returned string.
*
* @param params List of configuration parameters
* @param key Parameter name
*
* @return Pointer to copy of value or NULL if the parameter was not found
*
* @note The use of this function should be avoided after startup as the function
* will abort the process if memory allocation fails.
*/
char* config_copy_string(const CONFIG_PARAMETER *params, const char *key);
/**
* @brief Generate default module parameters
*