Skip to content

Commit 1d1eef4

Browse files
authored
Merge pull request #6160 from TeemuKultala/status_callback_fix
fix issue 6150
2 parents 55f710f + 34ef116 commit 1d1eef4

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

features/FEATURE_LWIP/lwip-interface/lwip_stack.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -444,9 +444,7 @@ static bool lwip_ppp = false;
444444

445445
static nsapi_error_t mbed_set_dhcp(struct netif *lwip_netif)
446446
{
447-
if (!lwip_ppp) {
448-
netif_set_up(lwip_netif);
449-
}
447+
netif_set_up(lwip_netif);
450448

451449
#if LWIP_DHCP
452450
if (lwip_dhcp && lwip_dhcp_has_to_be_set) {

features/netsocket/cellular/generic_modem_driver/PPPCellularInterface.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,9 @@ nsapi_error_t PPPCellularInterface::connect()
702702
* mbed_ppp_init() is a blocking call, it will block until
703703
* connected, or timeout after 30 seconds*/
704704
retcode = nsapi_ppp_connect(_fh, callback(this, &PPPCellularInterface::ppp_status_cb), _uname, _pwd, _stack);
705+
if (retcode == NSAPI_ERROR_OK && _connect_is_blocking) {
706+
_connect_status = NSAPI_STATUS_GLOBAL_UP;
707+
}
705708
} while ((_connect_status == NSAPI_STATUS_CONNECTING && _connect_is_blocking) &&
706709
apn_config && *apn_config);
707710

0 commit comments

Comments
 (0)