mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2026-03-13 12:32:29 +01:00
obuspa: reduce IPC cost for get calls
This commit is contained in:
parent
b766ea958a
commit
92b607bd0e
3 changed files with 40 additions and 4 deletions
|
|
@ -1,4 +1,3 @@
|
|||
if PACKAGE_obuspa
|
||||
config OBUSPA_MTP_ENABLE_MQTT
|
||||
bool "Enable MQTT as mtp protocol"
|
||||
default y
|
||||
|
|
@ -56,4 +55,3 @@ config OBUSPA_SESSION_EXTENSION
|
|||
Adds Device.LocalAgent.X_IOPSYS_EU_Session. object to simulate
|
||||
a CWMP like session
|
||||
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -5,13 +5,13 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=obuspa
|
||||
PKG_VERSION:=9.0.0.10
|
||||
PKG_VERSION:=9.0.0.11
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/obuspa.git
|
||||
PKG_SOURCE_VERSION:=4aba89c67ba57322d112d11e038bc6071252cbd8
|
||||
PKG_SOURCE_VERSION:=83784445e5254238aef38c9b27f182cc504f395a
|
||||
PKG_MAINTAINER:=Vivek Dutta <vivek.dutta@iopsys.eu>
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
|
|
|
|||
38
obuspa/patches/0022-use-datamodel-caching.patch
Normal file
38
obuspa/patches/0022-use-datamodel-caching.patch
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
diff --git a/src/core/cli_server.c b/src/core/cli_server.c
|
||||
index d45555a..c65e96a 100644
|
||||
--- a/src/core/cli_server.c
|
||||
+++ b/src/core/cli_server.c
|
||||
@@ -753,6 +753,10 @@ int ExecuteCli_Get(char *arg1, char *arg2, char *usage)
|
||||
}
|
||||
#endif
|
||||
|
||||
+ char *path[2] = {0};
|
||||
+ path[0] = arg1;
|
||||
+ vendor_create_dm_cache(path, 1);
|
||||
+
|
||||
// Exit if unable to get a list of all parameters referenced by the expression
|
||||
STR_VECTOR_Init(¶ms);
|
||||
INT_VECTOR_Init(&group_ids);
|
||||
diff --git a/src/core/data_model.h b/src/core/data_model.h
|
||||
index b9dc686..0767d02 100755
|
||||
--- a/src/core/data_model.h
|
||||
+++ b/src/core/data_model.h
|
||||
@@ -371,5 +371,6 @@ bool DM_PRIV_IsChildOf(char *path, dm_node_t *parent_node);
|
||||
bool DM_PRIV_IsChildNodeOf(dm_node_t *node, dm_node_t *parent_node);
|
||||
bool DM_PRIV_AreAllChildrenGroupId(dm_node_t *parent, int group_id);
|
||||
|
||||
+int vendor_create_dm_cache(char *paths[], int num_paths);
|
||||
#endif
|
||||
|
||||
diff --git a/src/core/handle_get.c b/src/core/handle_get.c
|
||||
index 170d27d..de3a755 100644
|
||||
--- a/src/core/handle_get.c
|
||||
+++ b/src/core/handle_get.c
|
||||
@@ -143,6 +143,7 @@ void MSG_HANDLER_HandleGet(Usp__Msg *usp, char *controller_endpoint, mtp_conn_t
|
||||
ExpandGetPathExpression(i, path_exprs[i], (int)depth, &get_expr_info[i], &ggv);
|
||||
}
|
||||
|
||||
+ vendor_create_dm_cache(path_exprs, num_path_expr);
|
||||
// Get all parameters
|
||||
GROUP_GET_VECTOR_GetValues(&ggv);
|
||||
|
||||
Loading…
Add table
Reference in a new issue