Merge pull request #6160 from TeemuKultala/status_callback_fix

fix issue 6150
pull/6182/head
Cruz Monrreal 2018-02-22 21:56:42 -06:00 committed by GitHub
commit 1d1eef47ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -444,9 +444,7 @@ static bool lwip_ppp = false;
static nsapi_error_t mbed_set_dhcp(struct netif *lwip_netif)
{
if (!lwip_ppp) {
netif_set_up(lwip_netif);
}
netif_set_up(lwip_netif);
#if LWIP_DHCP
if (lwip_dhcp && lwip_dhcp_has_to_be_set) {

View File

@ -702,6 +702,9 @@ nsapi_error_t PPPCellularInterface::connect()
* mbed_ppp_init() is a blocking call, it will block until
* connected, or timeout after 30 seconds*/
retcode = nsapi_ppp_connect(_fh, callback(this, &PPPCellularInterface::ppp_status_cb), _uname, _pwd, _stack);
if (retcode == NSAPI_ERROR_OK && _connect_is_blocking) {
_connect_status = NSAPI_STATUS_GLOBAL_UP;
}
} while ((_connect_status == NSAPI_STATUS_CONNECTING && _connect_is_blocking) &&
apn_config && *apn_config);