Skip to content

Commit 0548981

Browse files
authored
Merge pull request #13610 from boraozgen/bugfix/deactivate-context
Fix #13490 Cellular disconnect does not deactivate context
2 parents 83579b1 + 0604c49 commit 0548981

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

connectivity/cellular/source/framework/AT/AT_CellularContext.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,7 @@ nsapi_error_t AT_CellularContext::find_and_activate_context()
544544
delete_current_context();
545545
} else if (err == NSAPI_ERROR_OK) {
546546
_is_context_active = true;
547+
_is_context_activated = true;
547548
}
548549

549550
_at.unlock();
@@ -755,8 +756,9 @@ void AT_CellularContext::check_and_deactivate_context()
755756
rat = reg_params._act;
756757
// 3GPP TS 27.007:
757758
// For EPS, if an attempt is made to disconnect the last PDN connection, then the MT responds with ERROR
758-
if (_is_context_active && (rat < CellularNetwork::RAT_E_UTRAN || active_contexts_count > 1)) {
759+
if (_is_context_active && (rat < CellularNetwork::RAT_E_UTRAN || rat == CellularNetwork::RAT_NB1 || active_contexts_count > 1)) {
759760
_at.clear_error();
761+
760762
deactivate_context();
761763
}
762764

0 commit comments

Comments
 (0)