add function to update .dm_enabled_file called from external program

This commit is contained in:
Omar Kallel 2020-09-30 17:08:52 +01:00 committed by Amin Ben Ramdhane
parent 240b7b7488
commit 55ee5403eb
2 changed files with 13 additions and 0 deletions

View file

@ -128,3 +128,15 @@ void dmjson_get_string(char *jkey, char **jval)
{
bbf_api_dmjson_get_string(jkey, jval);
}
void dmbbf_update_enabled_notify_file(unsigned int dm_type, unsigned int amd_version, int instance_mode)
{
struct dmctx dmctx = {0};
dm_ctx_init(&dmctx, dm_type, amd_version, instance_mode);
dmctx.in_param = "";
dm_entry_enabled_notify(&dmctx, NULL);
dm_ctx_clean(&dmctx);
}

View file

@ -34,3 +34,4 @@ int dm_add_end_session(struct dmctx *ctx, void(*function)(struct execute_end_ses
void cwmp_set_end_session (unsigned int flag);
int bbfdmuci_lookup_ptr(struct uci_context *ctx, struct uci_ptr *ptr, char *package, char *section, char *option, char *value);
void bbf_apply_end_session(void);
void dmbbf_update_enabled_notify_file(unsigned int dm_type, unsigned int amd_version, int instance_mode);