Merge pull request #11923 from AriParkkila/cell-ppp-wait-connect

Cellular: Fix PPP to wait until connected event from (LWIP) PPP
pull/11932/merge
Martin Kojtal 2019-11-22 14:12:03 +01:00 committed by GitHub
commit b6edc5b0cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;
}