|
|
cf57e8 |
From 31f108aee1f328c8889b00547b212c4e3cb27fa2 Mon Sep 17 00:00:00 2001
|
|
|
cf57e8 |
From: Lubomir Rintel <lkundrak@v3.sk>
|
|
|
cf57e8 |
Date: Fri, 3 May 2019 18:07:33 +0200
|
|
|
cf57e8 |
Subject: [PATCH 2/4] bearer-qmi: unsolicited events might not be enabled on
|
|
|
cf57e8 |
disconnect
|
|
|
cf57e8 |
|
|
|
cf57e8 |
If a disconnection fails (because stop_network() failed), base-bearer
|
|
|
cf57e8 |
flips the state back to CONNECTED. Oops. At that point something is
|
|
|
cf57e8 |
clearly messed up, but it seems correct to assume the bearer is
|
|
|
cf57e8 |
connected.
|
|
|
cf57e8 |
|
|
|
cf57e8 |
Nevertheless, we will have already have unhooked the unsolicited eventsx
|
|
|
cf57e8 |
reporting. A subsequent attempt to disconnect the bearer will trip the
|
|
|
cf57e8 |
assertion:
|
|
|
cf57e8 |
|
|
|
cf57e8 |
#0 0x00007ffff75f2eb5 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
|
|
|
cf57e8 |
#1 0x00007ffff75dd895 in __GI_abort () at abort.c:79
|
|
|
cf57e8 |
#2 0x00007ffff77beb53 in g_assertion_message
|
|
|
cf57e8 |
(domain=<optimized out>, file=<optimized out>, line=<optimized out>, func=0x5088e0 <__FUNCTION__.56253> "cleanup_event_report_unsolicited_events", message=<optimized out>) at ../glib/gtestutils.c:2878
|
|
|
cf57e8 |
#3 0x00007ffff781a96f in g_assertion_message_expr
|
|
|
cf57e8 |
(domain=domain@entry=0x0, file=file@entry=0x507aad "mm-bearer-qmi.c", line=line@entry=1138, func=func@entry=0x5088e0 <__FUNCTION__.56253> "cleanup_event_report_unsolicited_events", expr=expr@entry=0x507ae5 "*indication_id != 0") at ../glib/gtestutils.c:2904
|
|
|
cf57e8 |
#4 0x00000000004a0c49 in cleanup_event_report_unsolicited_events (client=<optimized out>, indication_id=0x5bb30c, self=<optimized out>)
|
|
|
cf57e8 |
at mm-bearer-qmi.c:1138
|
|
|
cf57e8 |
#5 0x00000000004a0c49 in cleanup_event_report_unsolicited_events
|
|
|
cf57e8 |
(client=<optimized out>, indication_id=indication_id@entry=0x5bb30c, self=0x5bb420 [MMBearerQmi]) at mm-bearer-qmi.c:1132
|
|
|
cf57e8 |
#6 0x00000000004a0ee3 in disconnect_context_step (task=0x7fffe8012100 [GTask]) at mm-bearer-qmi.c:1854
|
|
|
cf57e8 |
#7 0x000000000046e889 in disconnect_auth_ready (self=<optimized out>, res=<optimized out>, ctx=ctx@entry=0x654630)
|
|
|
cf57e8 |
at mm-iface-modem-simple.c:865
|
|
|
cf57e8 |
#8 0x00007ffff79cfa9a in g_task_return_now (task=0x7fffe8012640 [GTask]) at ../gio/gtask.c:1209
|
|
|
cf57e8 |
...
|
|
|
cf57e8 |
---
|
|
|
cf57e8 |
src/mm-bearer-qmi.c | 6 +++++-
|
|
|
cf57e8 |
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
|
cf57e8 |
|
|
|
cf57e8 |
diff --git a/src/mm-bearer-qmi.c b/src/mm-bearer-qmi.c
|
|
|
cf57e8 |
index c75d5e4..f8c6544 100644
|
|
|
cf57e8 |
--- a/src/mm-bearer-qmi.c
|
|
|
cf57e8 |
+++ b/src/mm-bearer-qmi.c
|
|
|
cf57e8 |
@@ -970,7 +970,11 @@ cleanup_event_report_unsolicited_events (MMBearerQmi *self,
|
|
|
cf57e8 |
{
|
|
|
cf57e8 |
QmiMessageWdsSetEventReportInput *input;
|
|
|
cf57e8 |
|
|
|
cf57e8 |
- g_assert (*indication_id != 0);
|
|
|
cf57e8 |
+ if (*indication_id == 0) {
|
|
|
cf57e8 |
+ mm_warn ("Reporting of unsolicited events already cleared");
|
|
|
cf57e8 |
+ return;
|
|
|
cf57e8 |
+ }
|
|
|
cf57e8 |
+
|
|
|
cf57e8 |
g_signal_handler_disconnect (client, *indication_id);
|
|
|
cf57e8 |
*indication_id = 0;
|
|
|
cf57e8 |
|
|
|
cf57e8 |
--
|
|
|
cf57e8 |
1.8.3.1
|
|
|
cf57e8 |
|