Cellular: Fix PPP to wait until connected event from (LWIP) PPP

pull/11923/head
Ari Parkkila 2019-11-21 22:59:04 -08:00
parent 2bde6581a6
commit 90d7748514
1 changed files with 2 additions and 0 deletions

View File

@ -119,12 +119,14 @@ void CellularContext::do_connect_with_retry()
}
do_connect();
if (_cb_data.error == NSAPI_ERROR_OK) {
#if !NSAPI_PPP_AVAILABLE
// Some modems don't get the ip address right after connect so we must
// validate it but even if we don't get ip we still send NSAPI_STATUS_GLOBAL_UP
if (!_nonip_req && !_cp_in_use) { // don't validate if non-ip case
validate_ip_address();
}
call_network_cb(NSAPI_STATUS_GLOBAL_UP);
#endif
return;
}