mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-20 22:23:27 +00:00
hostapd: fix UPDATE_VAL
fail in uc_hostapd_iface_start
If the `intval` obtained from `info` is indeed 0, it cannot be set to `conf`. Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com> Link: https://github.com/openwrt/openwrt/pull/15495 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
parent
b0aecfaa4f
commit
b4dfa3b33c
@ -533,10 +533,12 @@ uc_hostapd_iface_start(uc_vm_t *vm, size_t nargs)
|
||||
return NULL;
|
||||
|
||||
#define UPDATE_VAL(field, name) \
|
||||
if ((intval = ucv_int64_get(ucv_object_get(info, name, NULL))) && \
|
||||
!errno && intval != conf->field) do { \
|
||||
do { \
|
||||
intval = ucv_int64_get(ucv_object_get(info, name, NULL)); \
|
||||
if (!errno && intval != conf->field) { \
|
||||
conf->field = intval; \
|
||||
changed = true; \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
conf = iface->conf;
|
||||
|
Loading…
Reference in New Issue
Block a user