From 4cd757bf33c04424481b359011a830ce5d1e9871 Mon Sep 17 00:00:00 2001 From: Feten Besbes Date: Fri, 24 Dec 2021 12:20:49 +0100 Subject: [PATCH] Download config with tr069 fails --- download.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/download.c b/download.c index 3fee899..d295b63 100644 --- a/download.c +++ b/download.c @@ -272,7 +272,9 @@ int apply_downloaded_file(struct cwmp *cwmp, struct download *pdownload, struct //TODO Not Supported error = FAULT_CPE_NO_FAULT; } else if (strcmp(pdownload->file_type, VENDOR_CONFIG_FILE_TYPE) == 0) { + cwmp_uci_init(); int err = cwmp_uci_import(NULL, VENDOR_CONFIG_FILE, UCI_STANDARD_CONFIG); + cwmp_uci_exit(); if (err == CWMP_OK) error = FAULT_CPE_NO_FAULT; else if (err == CWMP_GEN_ERR) @@ -685,7 +687,9 @@ void *thread_cwmp_rpc_cpe_apply_schedule_download(void *v) //TODO Not Supported error = FAULT_CPE_NO_FAULT; } else if (strcmp(apply_download->file_type, VENDOR_CONFIG_FILE_TYPE) == 0) { + cwmp_uci_init(); int err = cwmp_uci_import(NULL, VENDOR_CONFIG_FILE, UCI_STANDARD_CONFIG); + cwmp_uci_exit(); if (err == CWMP_OK) error = FAULT_CPE_NO_FAULT; else if (err == CWMP_GEN_ERR)