mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-02-12 16:51:53 +00:00
dawn_uci: fix crashing when uci config is received
Before we can unload the config, we have to search the package again.
This commit is contained in:
parent
50d54a6253
commit
1da5ad5a96
1 changed files with 8 additions and 0 deletions
|
@ -190,6 +190,14 @@ bool uci_get_dawn_sort_order() {
|
|||
|
||||
int uci_reset()
|
||||
{
|
||||
struct uci_context *ctx = uci_ctx;
|
||||
|
||||
if (!ctx) {
|
||||
ctx = uci_alloc_context();
|
||||
dawn_regmem(ctx);
|
||||
uci_ctx = ctx;
|
||||
}
|
||||
uci_pkg = uci_lookup_package(ctx, "dawn");
|
||||
uci_unload(uci_ctx, uci_pkg);
|
||||
dawn_unregmem(uci_pkg);
|
||||
uci_load(uci_ctx, "dawn", &uci_pkg);
|
||||
|
|
Loading…
Reference in a new issue