mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
obuspa: wait for datamodel micro-services
This commit is contained in:
parent
bb9d1621a5
commit
f47a2c3ef3
6 changed files with 30 additions and 19 deletions
|
|
@ -5,13 +5,13 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=obuspa
|
||||
PKG_VERSION:=7.0.4.1
|
||||
PKG_VERSION:=7.0.4.2
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/obuspa.git
|
||||
PKG_SOURCE_VERSION:=840b2fd662f3a7941c926975caff090959a7422b
|
||||
PKG_SOURCE_VERSION:=6d8ef8b7c7546b0405fd19b33f0cc3c62902e0a0
|
||||
PKG_MAINTAINER:=Vivek Dutta <vivek.dutta@iopsys.eu>
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@
|
|||
config_load obuspa
|
||||
config_get interface global interface ""
|
||||
|
||||
mode="$(fw_printenv -n netmode)"
|
||||
if [ "${mode}" == "extender" -a -z "$interface" ] ; then
|
||||
uci_set obuspa global interface "lan"
|
||||
if command -v fw_printenv; then
|
||||
mode="$(fw_printenv -n netmode)"
|
||||
if [ "${mode}" == "extender" -a -z "$interface" ] ; then
|
||||
uci_set obuspa global interface "lan"
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -124,6 +124,21 @@ get_vivsoi() {
|
|||
done
|
||||
}
|
||||
|
||||
get_netmode()
|
||||
{
|
||||
local mode
|
||||
|
||||
if command -v fw_printenv; then
|
||||
mode="$(fw_printenv -n netmode)"
|
||||
fi
|
||||
|
||||
if [ "$mode" != "extender" ]; then
|
||||
mode="full_access"
|
||||
fi
|
||||
|
||||
echo "$mode"
|
||||
}
|
||||
|
||||
config_load obuspa
|
||||
config_get_bool enable_obuspa global enabled 1
|
||||
config_get wan_intf global interface "wan"
|
||||
|
|
@ -210,12 +225,8 @@ if [ "${wan_intf}" == "${INTERFACE}" ]; then
|
|||
mtp_encrypt="0"
|
||||
fi
|
||||
fi
|
||||
mode="$(fw_printenv -n netmode)"
|
||||
if [ "$mode" == "extender" ]; then
|
||||
uci -q set obuspa.dhcpcontroller.assigned_role_name='extender'
|
||||
else
|
||||
uci -q set obuspa.dhcpcontroller.assigned_role_name='full_access'
|
||||
fi
|
||||
|
||||
uci -q set obuspa.dhcpcontroller.assigned_role_name="$(get_netmode)"
|
||||
uci -q set obuspa.dhcpcontroller.Enable='1'
|
||||
uci_change=1
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
void DM_PRIV_RequestInit(dm_req_t *req, dm_node_t *node, char *path, dm_instances_t *inst);
|
||||
--- a/src/core/msg_handler.c
|
||||
+++ b/src/core/msg_handler.c
|
||||
@@ -893,6 +893,20 @@ char *MtpSendItemToString(mtp_send_item_
|
||||
@@ -902,6 +902,20 @@ char *MtpSendItemToString(mtp_send_item_
|
||||
|
||||
/*********************************************************************//**
|
||||
**
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
--- a/src/core/data_model.c
|
||||
+++ b/src/core/data_model.c
|
||||
@@ -1242,7 +1242,7 @@ int DATA_MODEL_NotifyInstanceAdded(char
|
||||
@@ -1243,7 +1243,7 @@ int DATA_MODEL_NotifyInstanceAdded(char
|
||||
// Exit if instance already exists - nothing to do
|
||||
if (exists)
|
||||
{
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
return USP_ERR_CREATION_FAILURE;
|
||||
}
|
||||
|
||||
@@ -1327,7 +1327,7 @@ int DATA_MODEL_NotifyInstanceDeleted(cha
|
||||
@@ -1328,7 +1328,7 @@ int DATA_MODEL_NotifyInstanceDeleted(cha
|
||||
// Exit if instance does not exist - nothing to do
|
||||
if (exists == false)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,16 +1,14 @@
|
|||
diff --git a/src/core/data_model.c b/src/core/data_model.c
|
||||
index 2cf4b6c..b92cf59 100644
|
||||
--- a/src/core/data_model.c
|
||||
+++ b/src/core/data_model.c
|
||||
@@ -136,6 +136,7 @@ void DumpDataModelNodeMap(void);
|
||||
int GetVendorParam(dm_node_t *node, char *path, dm_instances_t *inst, char *buf, int len, dm_req_t *req);
|
||||
@@ -137,6 +137,7 @@ int GetVendorParam(dm_node_t *node, char
|
||||
int SetVendorParam(dm_node_t *node, char *path, dm_instances_t *inst, char *value, dm_req_t *req);
|
||||
double_link_t *FindLinkToFirstObject(double_linked_list_t *list);
|
||||
|
||||
+extern bool is_running_cli_local_command;
|
||||
/*********************************************************************//**
|
||||
**
|
||||
** DATA_MODEL_Init
|
||||
@@ -223,7 +224,9 @@ int DATA_MODEL_Init(void)
|
||||
@@ -224,7 +225,9 @@ int DATA_MODEL_Init(void)
|
||||
}
|
||||
|
||||
// Set the default values of OUI, Serial Number and (LocalAgent) EndpointID, and cache EndpointID
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue