diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2020-11-10 23:01:10 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2020-11-14 09:41:43 +0000 |
commit | 5d150ed23e122c06e1a4add0ca9c6f7e07502a17 (patch) | |
tree | e3d1a8b52a4a3bc0220aa2a4134f1837a5f1235a /src/mm-bearer-qmi.c | |
parent | da77dc7152b76728de0ce63cedf96ceb30f37046 (diff) |
core,plugins: consolidate connection/disconnection timeout values
Each different plugin or protocol had a different connection attempt
value. E.g. QMI and MBIM both used 60s max for the connection attempt,
while the u-blox plugin had up to 180s for ECM based connection
setups.
This commit consolidates all plugins and protocols to use the same
timeout values for commands that may take long to respond, e.g. a
connection atempt under low signal quality conditions.
A value of 180s for the connection attempt steps and 120s for a
disconnection attempt step is considered. Note, though, that in some
cases (like a IPv4v6 setup attempt using QMI) we may have more than
one such long step, so this doesn't mean that a connection attempt
will always take less than 180s.
Users of the connection/disconnection APIs should be able to handle
the case where the attempt times out in their side (e.g. with a lower
DBus request timeout), and which would not mean the actual request
they did really failed. E.g. a connection attempt with a DBus timeout
of 30s may fail in the user with a timeout error, but the attempt
would still go on for as much as the plugin/protocol needs.
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/270
Diffstat (limited to 'src/mm-bearer-qmi.c')
-rw-r--r-- | src/mm-bearer-qmi.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mm-bearer-qmi.c b/src/mm-bearer-qmi.c index b3ea0d84..e29414f4 100644 --- a/src/mm-bearer-qmi.c +++ b/src/mm-bearer-qmi.c @@ -479,7 +479,7 @@ connect_context_free (ConnectContext *ctx) input = qmi_message_wds_stop_network_input_new (); qmi_message_wds_stop_network_input_set_packet_data_handle (input, ctx->packet_data_handle_ipv4, NULL); - qmi_client_wds_stop_network (ctx->client_ipv4, input, 30, NULL, NULL, NULL); + qmi_client_wds_stop_network (ctx->client_ipv4, input, MM_BASE_BEARER_DEFAULT_DISCONNECTION_TIMEOUT, NULL, NULL, NULL); } g_clear_object (&ctx->client_ipv4); } @@ -501,7 +501,7 @@ connect_context_free (ConnectContext *ctx) input = qmi_message_wds_stop_network_input_new (); qmi_message_wds_stop_network_input_set_packet_data_handle (input, ctx->packet_data_handle_ipv6, NULL); - qmi_client_wds_stop_network (ctx->client_ipv6, input, 30, NULL, NULL, NULL); + qmi_client_wds_stop_network (ctx->client_ipv6, input, MM_BASE_BEARER_DEFAULT_DISCONNECTION_TIMEOUT, NULL, NULL, NULL); } g_clear_object (&ctx->client_ipv6); } @@ -1420,7 +1420,7 @@ connect_context_step (GTask *task) input = build_start_network_input (ctx); qmi_client_wds_start_network (ctx->client_ipv4, input, - 45, + MM_BASE_BEARER_DEFAULT_CONNECTION_TIMEOUT, g_task_get_cancellable (task), (GAsyncReadyCallback)start_network_ready, task); @@ -1511,7 +1511,7 @@ connect_context_step (GTask *task) input = build_start_network_input (ctx); qmi_client_wds_start_network (ctx->client_ipv6, input, - 45, + MM_BASE_BEARER_DEFAULT_CONNECTION_TIMEOUT, g_task_get_cancellable (task), (GAsyncReadyCallback)start_network_ready, task); @@ -1980,7 +1980,7 @@ disconnect_context_step (GTask *task) ctx->running_ipv6 = FALSE; qmi_client_wds_stop_network (ctx->client_ipv4, input, - 30, + MM_BASE_BEARER_DEFAULT_DISCONNECTION_TIMEOUT, NULL, (GAsyncReadyCallback)stop_network_ready, task); @@ -2011,7 +2011,7 @@ disconnect_context_step (GTask *task) ctx->running_ipv6 = TRUE; qmi_client_wds_stop_network (ctx->client_ipv6, input, - 30, + MM_BASE_BEARER_DEFAULT_DISCONNECTION_TIMEOUT, NULL, (GAsyncReadyCallback)stop_network_ready, task); |