From 32f5e4ef9911b3000e1ee4328a6606ee6ee5aeb5 Mon Sep 17 00:00:00 2001 From: suvendhu Date: Thu, 14 Sep 2023 13:56:56 +0530 Subject: [PATCH] Removed ubus socket path config --- docs/api/uci/cwmp.md | 7 ------- schemas/uci/cwmp.json | 7 ------- src/common.h | 1 - src/config.c | 6 ------ src/ubus_utils.c | 4 +--- 5 files changed, 1 insertion(+), 24 deletions(-) diff --git a/docs/api/uci/cwmp.md b/docs/api/uci/cwmp.md index 34c80bc..3879e88 100644 --- a/docs/api/uci/cwmp.md +++ b/docs/api/uci/cwmp.md @@ -324,13 +324,6 @@
/
CPE Connection request URI path
- -
ubus_socket
-
string
-
no
-
NULL
-
Specifies the path of the ubus socket.
-
provisioning_code
string
diff --git a/schemas/uci/cwmp.json b/schemas/uci/cwmp.json index 9a9e9aa..1bba0e5 100644 --- a/schemas/uci/cwmp.json +++ b/schemas/uci/cwmp.json @@ -250,13 +250,6 @@ "default": "/", "description": "CPE Connection request URI path" }, - { - "name": "ubus_socket", - "type": "string", - "required": "no", - "default": "NULL", - "description": "Specifies the path of the ubus socket." - }, { "name": "provisioning_code", "type": "string", diff --git a/src/common.h b/src/common.h index 16752b7..f253f5f 100644 --- a/src/common.h +++ b/src/common.h @@ -112,7 +112,6 @@ typedef struct config { char cpe_userid[BUF_SIZE_256]; char cpe_passwd[BUF_SIZE_256]; char custom_notify_json[BUF_SIZE_256]; - char ubus_socket[BUF_SIZE_256]; char connection_request_path[BUF_SIZE_256]; char auto_tc_transfer_type[BUF_SIZE_16]; char auto_tc_result_type[BUF_SIZE_16]; diff --git a/src/config.c b/src/config.c index 5b8cde2..f8d0ca8 100755 --- a/src/config.c +++ b/src/config.c @@ -448,7 +448,6 @@ static void configure_var_state(void) int get_preinit_config() { -#define UCI_CPE_UBUS_SOCKET_PATH "cwmp.cpe.ubus_socket" #define UCI_CPE_LOG_FILE_NAME "cwmp.cpe.log_file_name" #define UCI_CPE_LOG_MAX_SIZE "cwmp.cpe.log_max_size" #define UCI_CPE_ENABLE_STDOUT_LOG "cwmp.cpe.log_to_console" @@ -467,10 +466,6 @@ int get_preinit_config() log_set_severity_idx(value); FREE(value); - uci_get_value(UCI_CPE_UBUS_SOCKET_PATH, &value); - snprintf(cwmp_main->conf.ubus_socket, sizeof(cwmp_main->conf.ubus_socket), "%s", value ? value : ""); - FREE(value); - uci_get_value(UCI_CPE_LOG_FILE_NAME, &value); log_set_log_file_name(value); FREE(value); @@ -513,7 +508,6 @@ int get_preinit_config() cwmp_uci_exit(); - CWMP_LOG(DEBUG, "CWMP CONFIG - ubus socket: %s", cwmp_main->conf.ubus_socket); CWMP_LOG(DEBUG, "CWMP CONFIG - default wan interface: %s", cwmp_main->conf.default_wan_iface); CWMP_LOG(DEBUG, "CWMP CONFIG - amendement version: %d", cwmp_main->conf.amd_version); diff --git a/src/ubus_utils.c b/src/ubus_utils.c index e759b7c..8bb97b0 100644 --- a/src/ubus_utils.c +++ b/src/ubus_utils.c @@ -370,9 +370,7 @@ void bb_add_string(struct blob_buf *bb, const char *name, const char *value) int icwmp_uloop_ubus_init() { - char *u_sock_path = strlen(cwmp_main->conf.ubus_socket) ? cwmp_main->conf.ubus_socket : NULL; - - ubus_ctx = ubus_connect(u_sock_path); + ubus_ctx = ubus_connect(NULL); if (!ubus_ctx) return -1;