MXS-1929: Store filters in smart pointers
The FilterDef structs are now stored in a vector<std::shared_ptr>. This should make it easier to use filters even if they are deleted before the session using them closes. All internal functions now take a smart point as a parameter. One problematic case will be debugcmd.cc which moves information around as pointers cast into unsigned longs.
This commit is contained in:
@ -215,7 +215,7 @@ bool runtime_create_filter(const char *name, const char *module, MXS_CONFIG_PARA
|
||||
*
|
||||
* @return True if filter was destroyed
|
||||
*/
|
||||
bool runtime_destroy_filter(FilterDef* filter);
|
||||
bool runtime_destroy_filter(const SFilterDef& filter);
|
||||
|
||||
/**
|
||||
* @brief Destroy a monitor
|
||||
@ -283,9 +283,9 @@ MXS_MONITOR* runtime_create_monitor_from_json(json_t* json);
|
||||
*
|
||||
* @param json JSON defining the filter
|
||||
*
|
||||
* @return Created filter or NULL on error
|
||||
* @return True if filter was created, false on error
|
||||
*/
|
||||
FilterDef* runtime_create_filter_from_json(json_t* json);
|
||||
bool runtime_create_filter_from_json(json_t* json);
|
||||
|
||||
/**
|
||||
* @brief Create a new service from JSON
|
||||
|
||||
Reference in New Issue
Block a user