Merge pull request #621 from ourairquality/dhcpc-flag-stopped

sdk_wifi_station_dhcpc_stop: ensure the client is flagged as stopped.
This commit is contained in:
Ruslan V. Uss 2018-04-30 15:14:18 +05:00 committed by GitHub
commit 5830e001cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -563,12 +563,12 @@ bool sdk_wifi_station_dhcpc_stop(void) {
if (sdk_wifi_get_opmode() == 2) {
return false;
}
if (netif && sdk_dhcpc_flag == DHCP_STARTED) {
LOCK_TCPIP_CORE();
if (netif && sdk_dhcpc_flag == DHCP_STARTED) {
dhcp_stop(netif);
}
sdk_dhcpc_flag = DHCP_STOPPED;
UNLOCK_TCPIP_CORE();
}
return true;
}