Skip to content

Commit

Permalink
reformat previous patch to not use dhcp_stop in isr
Browse files Browse the repository at this point in the history
  • Loading branch information
maidnl committed Jun 20, 2024
1 parent ef10b70 commit f8c2920
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions connectivity/lwipstack/source/LWIPInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,11 @@ nsapi_error_t LWIP::Interface::set_dhcp()

#if LWIP_DHCP
if (dhcp_has_to_be_set) {
if(dhcp_started) {
dhcp_stop(&netif);
dhcp_started = false;
}

err_t err = dhcp_start(&netif);
dhcp_has_to_be_set = false;
if (err) {
Expand Down Expand Up @@ -200,9 +205,7 @@ void LWIP::Interface::netif_link_irq(struct netif *netif)
}
} else {
if(interface->dhcp_started) {
interface->dhcp_started = false;
interface->dhcp_has_to_be_set = true;
dhcp_stop(netif);
}
osSemaphoreRelease(interface->unlinked);
if (netif_is_up(&interface->netif)) {
Expand Down

0 comments on commit f8c2920

Please sign in to comment.