Fix ctrl_iface BLACKLIST return value
Adding a new entry was returning FAIL on success due to incorrect assumption of wpa_blacklist_add() returning 0 on success (it returns the positive blacklist count). Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
23fbf45cf5
commit
bd8838a387
1 changed files with 2 additions and 2 deletions
|
@ -1861,10 +1861,10 @@ static int wpa_supplicant_ctrl_iface_blacklist(struct wpa_supplicant *wpa_s,
|
||||||
* skipped when processing scan results.
|
* skipped when processing scan results.
|
||||||
*/
|
*/
|
||||||
ret = wpa_blacklist_add(wpa_s, bssid);
|
ret = wpa_blacklist_add(wpa_s, bssid);
|
||||||
if (ret != 0)
|
if (ret < 0)
|
||||||
return -1;
|
return -1;
|
||||||
ret = wpa_blacklist_add(wpa_s, bssid);
|
ret = wpa_blacklist_add(wpa_s, bssid);
|
||||||
if (ret != 0)
|
if (ret < 0)
|
||||||
return -1;
|
return -1;
|
||||||
os_memcpy(buf, "OK\n", 3);
|
os_memcpy(buf, "OK\n", 3);
|
||||||
return 3;
|
return 3;
|
||||||
|
|
Loading…
Reference in a new issue