shared-qmi: if getting TP/SSP fails, assume unsupported

Until now we were only considering TP/SSP unsupported if we received
a QMI protocol error (e.g. reporting unknown command).

We now also consider TP/SSP unsupported if the actual request
succeeds, but an error is reported in the response. There is no point
in considering TP/SSP supported if the plain get request without input
TLVs given fails.
This commit is contained in:
Aleksander Morgado
2021-03-15 15:11:41 +01:00
parent 1a5f90f15b
commit 65a7624ffd

View File

@@ -889,7 +889,7 @@ load_current_capabilities_get_technology_preference_ready (QmiClientNas *client,
} else if (!qmi_message_nas_get_technology_preference_output_get_result (output, &error)) { } else if (!qmi_message_nas_get_technology_preference_output_get_result (output, &error)) {
mm_obj_dbg (self, "couldn't get technology preference: %s", error->message); mm_obj_dbg (self, "couldn't get technology preference: %s", error->message);
g_error_free (error); g_error_free (error);
priv->feature_nas_tp = FEATURE_SUPPORTED; priv->feature_nas_tp = FEATURE_UNSUPPORTED;
} else { } else {
qmi_message_nas_get_technology_preference_output_get_active ( qmi_message_nas_get_technology_preference_output_get_active (
output, output,
@@ -929,7 +929,7 @@ load_current_capabilities_get_system_selection_preference_ready (QmiClientNas *c
} else if (!qmi_message_nas_get_system_selection_preference_output_get_result (output, &error)) { } else if (!qmi_message_nas_get_system_selection_preference_output_get_result (output, &error)) {
mm_obj_dbg (self, "couldn't get system selection preference: %s", error->message); mm_obj_dbg (self, "couldn't get system selection preference: %s", error->message);
g_error_free (error); g_error_free (error);
priv->feature_nas_ssp = FEATURE_SUPPORTED; priv->feature_nas_ssp = FEATURE_UNSUPPORTED;
} else { } else {
qmi_message_nas_get_system_selection_preference_output_get_mode_preference ( qmi_message_nas_get_system_selection_preference_output_get_mode_preference (
output, output,