|
|
70b171 |
From a32f0e0e4457d561b1aebaf5e8b3390e7868ef90 Mon Sep 17 00:00:00 2001
|
|
|
70b171 |
From: Lubomir Rintel <lkundrak@v3.sk>
|
|
|
70b171 |
Date: Fri, 3 May 2019 19:36:37 +0200
|
|
|
70b171 |
Subject: [PATCH 4/4] bearer-qmi: don't throw away packet data handles on
|
|
|
70b171 |
cancellation
|
|
|
70b171 |
|
|
|
70b171 |
If the connection attempt is cancelled, the base bearer will attempt a
|
|
|
70b171 |
disconnection because it could reach the point after it connected the
|
|
|
70b171 |
network. However, for that to work we must not forget the packet data
|
|
|
70b171 |
handles, and the ip client instances.
|
|
|
70b171 |
---
|
|
|
70b171 |
src/mm-bearer-qmi.c | 13 +++++++++++++
|
|
|
70b171 |
1 file changed, 13 insertions(+)
|
|
|
70b171 |
|
|
|
70b171 |
diff --git a/src/mm-bearer-qmi.c b/src/mm-bearer-qmi.c
|
|
|
70b171 |
index 10664a8..a5d6d29 100644
|
|
|
70b171 |
--- a/src/mm-bearer-qmi.c
|
|
|
70b171 |
+++ b/src/mm-bearer-qmi.c
|
|
|
70b171 |
@@ -1047,6 +1047,19 @@ connect_context_step (ConnectContext *ctx)
|
|
|
70b171 |
MM_CORE_ERROR,
|
|
|
70b171 |
MM_CORE_ERROR_CANCELLED,
|
|
|
70b171 |
"Connection setup operation has been cancelled");
|
|
|
70b171 |
+ if (ctx->data) {
|
|
|
70b171 |
+ ctx->self->priv->data = g_object_ref (ctx->data);
|
|
|
70b171 |
+ /* If we managed to succeed at connecting, we need to preserve the client
|
|
|
70b171 |
+ * and the handle, so that subsequent disconnection can destroy them. */
|
|
|
70b171 |
+ if (ctx->client_ipv4) {
|
|
|
70b171 |
+ ctx->self->priv->client_ipv4 = g_object_ref (ctx->client_ipv4);
|
|
|
70b171 |
+ ctx->self->priv->packet_data_handle_ipv4 = ctx->packet_data_handle_ipv4;
|
|
|
70b171 |
+ }
|
|
|
70b171 |
+ if (ctx->client_ipv6) {
|
|
|
70b171 |
+ ctx->self->priv->client_ipv6 = g_object_ref (ctx->client_ipv6);
|
|
|
70b171 |
+ ctx->self->priv->packet_data_handle_ipv6 = ctx->packet_data_handle_ipv6;
|
|
|
70b171 |
+ }
|
|
|
70b171 |
+ }
|
|
|
70b171 |
connect_context_complete_and_free (ctx);
|
|
|
70b171 |
return;
|
|
|
70b171 |
}
|
|
|
70b171 |
--
|
|
|
70b171 |
1.8.3.1
|
|
|
70b171 |
|