broadband-modem-mbim: translate UNSUPPORTED error during packet attach

So that the upper layers are allowed to decide what to do in case the
modem doesn't support the operation.
This commit is contained in:
Aleksander Morgado
2022-10-20 10:41:46 +00:00
parent 9f330da90b
commit c9bcaa3312

View File

@@ -9021,7 +9021,10 @@ packet_service_set_ready (MbimDevice *device,
}
if (error) {
g_task_return_error (task, g_steal_pointer (&error));
if (g_error_matches (error, MBIM_STATUS_ERROR, MBIM_STATUS_ERROR_NO_DEVICE_SUPPORT))
g_task_return_new_error (task, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED, "%s", error->message);
else
g_task_return_error (task, g_steal_pointer (&error));
g_object_unref (task);
return;
}