Clean just parameters list from the context

This commit is contained in:
Omar Kallel 2020-10-07 16:09:11 +01:00 committed by Amin Ben Ramdhane
parent 0b0e8a9bdc
commit 5dec85888a
2 changed files with 14 additions and 1 deletions

View file

@ -155,7 +155,18 @@ static int dm_ctx_init_custom(struct dmctx *ctx, unsigned int dm_type, unsigned
ctx->end_session_flag = 0;
return 0;
}
void dm_ctx_init_list_parameter(struct dmctx *ctx)
{
INIT_LIST_HEAD(&ctx->list_parameter);
INIT_LIST_HEAD(&ctx->set_list_tmp);
INIT_LIST_HEAD(&ctx->list_fault_param);
}
void dm_ctx_clean_list_parameter(struct dmctx *ctx)
{
free_all_list_parameter(ctx);
free_all_set_list_tmp(ctx);
free_all_list_fault_param(ctx);
}
static int dm_ctx_clean_custom(struct dmctx *ctx, int custom)
{
free_all_list_parameter(ctx);

View file

@ -56,6 +56,8 @@ void dm_execute_cli_command(char *file, unsigned int dmtype, unsigned int amd_ve
void wepkey_cli(int argc, char** argv);
int free_dynamic_arrays(void);
int dmentry_get_parameter_leaf_value(struct dmctx *ctx, char *inparam);
void dm_ctx_init_list_parameter(struct dmctx *ctx);
void dm_ctx_clean_list_parameter(struct dmctx *ctx);
#ifdef BBF_TR064
#define DM_ENTRY_UPNP_CHECK_CHANGES() \
do { \