modem-helpers-qmi: don't check result when parsing UIM Get Card Status Output

Do it earlier, before running the parser.
This commit is contained in:
Aleksander Morgado
2020-10-29 23:41:28 +01:00
parent d7288861a5
commit 5265c0bd7c
2 changed files with 3 additions and 9 deletions

View File

@@ -695,7 +695,7 @@ unlock_required_uim_get_card_status_ready (QmiClientUim *client,
ctx = g_task_get_task_data (task);
output = qmi_client_uim_get_card_status_finish (client, res, &error);
if (!output) {
if (!output || !qmi_message_uim_get_card_status_output_get_result (output, &error)) {
g_prefix_error (&error, "QMI operation failed: ");
g_task_return_error (task, error);
g_object_unref (task);
@@ -947,7 +947,7 @@ unlock_retries_uim_get_card_status_ready (QmiClientUim *client,
self = g_task_get_source_object (task);
output = qmi_client_uim_get_card_status_finish (client, res, &error);
if (!output) {
if (!output || !qmi_message_uim_get_card_status_output_get_result (output, &error)) {
g_prefix_error (&error, "QMI operation failed: ");
g_task_return_error (task, error);
g_object_unref (task);
@@ -1933,8 +1933,7 @@ get_sim_lock_status_via_get_card_status_ready (QmiClientUim *client,
ctx = g_task_get_task_data (task);
output = qmi_client_uim_get_card_status_finish (client, res, &error);
if (!output ||
!qmi_message_uim_get_card_status_output_get_result (output, &error)) {
if (!output || !qmi_message_uim_get_card_status_output_get_result (output, &error)) {
g_prefix_error (&error, "QMI operation failed: ");
g_task_return_error (task, error);
g_object_unref (task);

View File

@@ -1818,11 +1818,6 @@ mm_qmi_uim_get_card_status_output_parse (gpointer log_
* purposes, we're going to consider as the SIM to use the one identified as
* 'primary GW' exclusively. We don't really support Dual Sim Dual Standby yet. */
if (!qmi_message_uim_get_card_status_output_get_result (output, error)) {
g_prefix_error (error, "QMI operation failed: ");
return FALSE;
}
qmi_message_uim_get_card_status_output_get_card_status (
output,
&index_gw_primary,