Merge pull request #11190 from jarvte/fix_wise1570_netsocket_tests

Cellular: failure when deleting created context is not considered error
pull/11188/head
Anna Bridge 2019-08-15 12:58:32 +01:00 committed by GitHub
commit 2af2b1b18b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -167,9 +167,8 @@ AT_CellularBase::CellularProperty AT_CellularContext::pdp_type_t_to_cellular_pro
}
// PDP Context handling
nsapi_error_t AT_CellularContext::delete_current_context()
void AT_CellularContext::delete_current_context()
{
return NSAPI_ERROR_OK;
}
nsapi_error_t AT_CellularContext::do_user_authentication()

View File

@ -291,7 +291,7 @@ void AT_CellularContext::set_credentials(const char *apn, const char *uname, con
}
// PDP Context handling
nsapi_error_t AT_CellularContext::delete_current_context()
void AT_CellularContext::delete_current_context()
{
tr_info("Delete context %d", _cid);
_at.clear_error();
@ -303,7 +303,8 @@ nsapi_error_t AT_CellularContext::delete_current_context()
_new_context_set = false;
}
return _at.get_last_error();
// there is nothing we can do if deleting of context fails. No point reporting an error (for example disconnect).
_at.clear_error();
}
nsapi_error_t AT_CellularContext::do_user_authentication()

View File

@ -114,7 +114,7 @@ private:
nsapi_error_t find_and_activate_context();
nsapi_error_t activate_ip_context();
void check_and_deactivate_context();
nsapi_error_t delete_current_context();
void delete_current_context();
nsapi_error_t check_operation(nsapi_error_t err, ContextOperation op);
void ciot_opt_cb(mbed::CellularNetwork::CIoT_Supported_Opt ciot_opt);
virtual void do_connect_with_retry();