From 386dab2bfaaea4b8076a24a9222367a940a8e006 Mon Sep 17 00:00:00 2001 From: Omar Kallel Date: Mon, 13 Mar 2023 17:27:41 +0100 Subject: [PATCH] Remove use of bbf context flag --- dmbbfcommon.c | 5 ----- dmbbfcommon.h | 1 - dmentry.c | 1 - libbbf_api/dmapi.h | 1 - libbbf_ubus/libbbf_ubus.c | 6 ++---- 5 files changed, 2 insertions(+), 12 deletions(-) diff --git a/dmbbfcommon.c b/dmbbfcommon.c index 70d282e1..b5290f8e 100644 --- a/dmbbfcommon.c +++ b/dmbbfcommon.c @@ -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; diff --git a/dmbbfcommon.h b/dmbbfcommon.h index 942db49e..64e78733 100644 --- a/dmbbfcommon.h +++ b/dmbbfcommon.h @@ -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); diff --git a/dmentry.c b/dmentry.c index 844065bb..65293b22 100644 --- a/dmentry.c +++ b/dmentry.c @@ -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; } diff --git a/libbbf_api/dmapi.h b/libbbf_api/dmapi.h index 7a517355..b0df64ca 100644 --- a/libbbf_api/dmapi.h +++ b/libbbf_api/dmapi.h @@ -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; diff --git a/libbbf_ubus/libbbf_ubus.c b/libbbf_ubus/libbbf_ubus.c index cf39aaf4..9571d1b3 100644 --- a/libbbf_ubus/libbbf_ubus.c +++ b/libbbf_ubus/libbbf_ubus.c @@ -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");