Remove use of bbf context flag

This commit is contained in:
Omar Kallel 2023-03-13 17:27:41 +01:00
parent 61f1c14076
commit 386dab2bfa
5 changed files with 2 additions and 12 deletions

View file

@ -11,11 +11,6 @@
#include "dmbbfcommon.h"
void bbf_set_end_session_flag(struct dmctx *ctx, unsigned int flag)
{
ctx->end_session_flag |= flag;
}
int set_bbfdatamodel_type(int bbf_type)
{
bbfdatamodel_type = bbf_type;

View file

@ -21,7 +21,6 @@ int set_bbfdatamodel_type(int bbf_type);
int get_bbfdatamodel_type(void);
void del_list_fault_param(struct param_fault *param_fault);
void bbf_set_end_session_flag (struct dmctx *ctx, unsigned int flag);
int bbfdmuci_lookup_ptr(struct uci_context *ctx, struct uci_ptr *ptr, char *package, char *section, char *option, char *value);
int get_dm_type(char *dm_str);

View file

@ -144,7 +144,6 @@ static int dm_ctx_init_custom(struct dmctx *ctx, unsigned int instance_mode, DMO
ctx->instance_mode = instance_mode;
ctx->dm_entryobj = tEntryObj;
ctx->dm_version = DEFAULT_DMVERSION;
ctx->end_session_flag = 0;
return 0;
}

View file

@ -205,7 +205,6 @@ struct dmctx
unsigned char inparam_isparam;
unsigned char findparam;
char *inst_buf[16];
unsigned int end_session_flag;
bool isgetschema;
bool iscommand;
bool isevent;

View file

@ -729,11 +729,9 @@ static int libbbf_ubus_set_handler(struct ubus_context *ctx, struct ubus_object
//Apply the parameter
fault = dm_entry_apply(&bbf_ctx, CMD_SET_VALUE);
if (fault == 0 && fault_occured == false) {
if (fault == 0 && fault_occured == false)
blobmsg_add_u8(&bb, "status", true);
if (get_bbfdatamodel_type() == BBFDM_CWMP)
blobmsg_add_u64(&bb, "flag", bbf_ctx.end_session_flag);
} else {
else {
if (!array)
array = blobmsg_open_array(&bb, "parameters");