Skip to content

Cellular: failure when deleting created context is not considered error #11190

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions UNITTESTS/stubs/AT_CellularContext_stub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,8 @@ pdp_type_t AT_CellularContext::string_to_pdp_type(const char *pdp_type)
}

// 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()
Expand Down
5 changes: 3 additions & 2 deletions features/cellular/framework/AT/AT_CellularContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ pdp_type_t AT_CellularContext::string_to_pdp_type(const char *pdp_type_str)
}

// 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();
Expand All @@ -321,7 +321,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()
Expand Down
2 changes: 1 addition & 1 deletion features/cellular/framework/AT/AT_CellularContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class AT_CellularContext : public CellularContext, public AT_CellularBase {
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();
Expand Down