bearer-qmi: 'no-effect' errors while starting network aren't fatal
This commit is contained in:
@@ -130,6 +130,18 @@ start_network_ready (QmiClientWds *client,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!qmi_message_wds_start_network_output_get_result (output, &error)) {
|
if (!qmi_message_wds_start_network_output_get_result (output, &error)) {
|
||||||
|
/* No-effect errors should be ignored. The modem will keep the
|
||||||
|
* connection active as long as there is a WDS client which requested
|
||||||
|
* to start the network. If ModemManager crashed while a connection was
|
||||||
|
* active, we would be leaving an unreleased WDS client around and the
|
||||||
|
* modem would just keep connected. */
|
||||||
|
if (g_error_matches (error,
|
||||||
|
QMI_PROTOCOL_ERROR,
|
||||||
|
QMI_PROTOCOL_ERROR_NO_EFFECT)) {
|
||||||
|
g_error_free (error);
|
||||||
|
|
||||||
|
/* Fall down to a successful connection */
|
||||||
|
} else {
|
||||||
mm_info ("error: couldn't start network: %s", error->message);
|
mm_info ("error: couldn't start network: %s", error->message);
|
||||||
if (g_error_matches (error,
|
if (g_error_matches (error,
|
||||||
QMI_PROTOCOL_ERROR,
|
QMI_PROTOCOL_ERROR,
|
||||||
@@ -159,6 +171,7 @@ start_network_ready (QmiClientWds *client,
|
|||||||
qmi_message_wds_start_network_output_unref (output);
|
qmi_message_wds_start_network_output_unref (output);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
qmi_message_wds_start_network_output_get_packet_data_handle (output, &ctx->packet_data_handle, NULL);
|
qmi_message_wds_start_network_output_get_packet_data_handle (output, &ctx->packet_data_handle, NULL);
|
||||||
qmi_message_wds_start_network_output_unref (output);
|
qmi_message_wds_start_network_output_unref (output);
|
||||||
|
Reference in New Issue
Block a user