broadband-modem-mbim: remove context type comparison on disconnection reports

Since 1.18 the user can request a different APN type during the
connection attempt, which translates into a different context type in
the actual MBIM Connect Set request. Therefore, the context type of a
given connection is no longer always INTERNET.

Matching by the session id to report disconnections should be more
than enough, which also helps to cover the case where the modem
doesn't report the original context type used during the
attempt (e.g. reporting NONE unconditionally).

Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/614
This commit is contained in:
Aleksander Morgado
2022-08-16 16:40:16 +00:00
committed by Aleksander Morgado
parent b1bdc34130
commit f6c1939f5c
+1 -2
View File
@@ -4651,8 +4651,7 @@ basic_connect_notification_connect (MMBroadbandModemMbim *self,
if (!bearer_list)
return;
if (mbim_uuid_to_context_type (context_type) == MBIM_CONTEXT_TYPE_INTERNET &&
activation_state == MBIM_ACTIVATION_STATE_DEACTIVATED) {
if (activation_state == MBIM_ACTIVATION_STATE_DEACTIVATED) {
ReportDisconnectedStatusContext ctx;
g_autoptr(GError) connection_error = NULL;