mirror of
https://dev.iopsys.eu/bbf/icwmp.git
synced 2025-12-10 07:44:41 +01:00
Fix icwmpd ubus reload
After refactoring, the icwmpd code no longer allocates the UCI context in the ubus thread so when it attempts to reload the config, the UCI calls fail and the reload fails. Update ubus_utils.c to call init before reloading the config and call exit once reloaded.
This commit is contained in:
parent
12f1921f15
commit
712cb443c1
1 changed files with 2 additions and 0 deletions
|
|
@ -13,6 +13,7 @@
|
|||
#include "log.h"
|
||||
#include "sched_inform.h"
|
||||
#include "event.h"
|
||||
#include "cwmp_uci.h"
|
||||
|
||||
typedef int (*callback)(struct blob_buf *b);
|
||||
|
||||
|
|
@ -38,6 +39,7 @@ static int reload_cmd(struct blob_buf *b)
|
|||
blobmsg_add_string(b, "info", "Session running, reload at the end of the session");
|
||||
} else {
|
||||
pthread_mutex_lock(&(cwmp_main.mutex_session_queue));
|
||||
cwmp_uci_reinit();
|
||||
cwmp_apply_acs_changes();
|
||||
pthread_mutex_unlock(&(cwmp_main.mutex_session_queue));
|
||||
blobmsg_add_u32(b, "status", 0);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue