File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
package/network/services/hostapd/src/src/ap Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -256,6 +256,7 @@ uc_hostapd_bss_set_config(uc_vm_t *vm, size_t nargs)
256256 uc_value_t * files_only = uc_fn_arg (2 );
257257 unsigned int i , idx = 0 ;
258258 int ret = -1 ;
259+ bool started ;
259260
260261 if (!hapd || ucv_type (file ) != UC_STRING )
261262 goto out ;
@@ -287,6 +288,7 @@ uc_hostapd_bss_set_config(uc_vm_t *vm, size_t nargs)
287288 goto free ;
288289 }
289290
291+ started = hapd -> started ;
290292 __uc_hostapd_bss_stop (hapd );
291293
292294 old_bss = hapd -> conf ;
@@ -299,7 +301,10 @@ uc_hostapd_bss_set_config(uc_vm_t *vm, size_t nargs)
299301 if (hapd == iface -> bss [0 ])
300302 memcpy (hapd -> own_addr , hapd -> conf -> bssid , ETH_ALEN );
301303
302- ret = __uc_hostapd_bss_start (hapd );
304+ if (started )
305+ ret = __uc_hostapd_bss_start (hapd );
306+ else
307+ ret = 0 ;
303308 hostapd_ucode_update_interfaces ();
304309
305310free :
You can’t perform that action at this time.
0 commit comments