refactor ex_data_runtime & fix all leak memory
This commit is contained in:
@@ -18,7 +18,9 @@ extern "C"
|
||||
|
||||
#include "maat.h"
|
||||
#include "maat_table.h"
|
||||
#include "maat_ex_data.h"
|
||||
#include "cJSON/cJSON.h"
|
||||
#include "fqdn_engine.h"
|
||||
|
||||
struct fqdn_plugin_runtime;
|
||||
|
||||
@@ -28,14 +30,13 @@ void *fqdn_plugin_schema_new(cJSON *json, struct table_manager *tbl_mgr,
|
||||
void fqdn_plugin_schema_free(void *fqdn_plugin_schema);
|
||||
|
||||
/* fqdn plugin table ex data API */
|
||||
struct ex_data_schema *fqdn_plugin_table_get_ex_data_schema(void *fqdn_plugin_schema);
|
||||
|
||||
int fqdn_plugin_table_set_ex_data_schema(void *fqdn_plugin_schema,
|
||||
maat_ex_new_func_t *new_func,
|
||||
maat_ex_free_func_t *free_func,
|
||||
maat_ex_dup_func_t *dup_func,
|
||||
long argl, void *argp,
|
||||
struct log_handle *logger);
|
||||
int fqdn_plugin_table_set_ex_container_schema(void *fqdn_plugin_schema, int table_id,
|
||||
maat_ex_new_func_t *new_func,
|
||||
maat_ex_free_func_t *free_func,
|
||||
maat_ex_dup_func_t *dup_func,
|
||||
void (*custom_data_free)(void *),
|
||||
long argl, void *argp);
|
||||
struct ex_container_schema *fqdn_plugin_table_get_ex_container_schema(void *fqdn_plugin_schema);
|
||||
|
||||
/* fqdn plugin runtime API */
|
||||
void *fqdn_plugin_runtime_new(void *fqdn_plugin_schema, int max_thread_num,
|
||||
@@ -49,8 +50,11 @@ int fqdn_plugin_runtime_commit(void *fqdn_plugin_runtime, const char *table_name
|
||||
|
||||
struct ex_data_runtime *fqdn_plugin_runtime_get_ex_data_rt(void *fqdn_plugin_runtime);
|
||||
|
||||
int fqdn_plugin_runtime_get_ex_data(void *fqdn_plugin_runtime, void *fqdn_plugin_schema,
|
||||
const char *fqdn, void **ex_data_array, size_t n_ex_data);
|
||||
int fqdn_plugin_runtime_get_ex_data(void *fqdn_plugin_runtime, const char *fqdn,
|
||||
void **ex_data_array, size_t n_ex_data);
|
||||
|
||||
void fqdn_rule_free(struct FQDN_rule *fqdn_rule);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user