diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2023-04-17 16:18:09 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksandermj@chromium.org> | 2023-05-03 12:38:43 +0000 |
commit | d906443eeed6c0ebc555d8b399edf841611e77e1 (patch) | |
tree | 2af49f642c7701e3598bd450881303df56ae6ce7 /src/mm-broadband-modem.c | |
parent | 200f827d386a15ce096d8dd476b21d09d919d8f0 (diff) |
broadband-modem: explicitly abort ongoing attempt when disabling
Diffstat (limited to 'src/mm-broadband-modem.c')
-rw-r--r-- | src/mm-broadband-modem.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c index 8ae17909..e5a892e4 100644 --- a/src/mm-broadband-modem.c +++ b/src/mm-broadband-modem.c @@ -11235,6 +11235,7 @@ schedule_initial_registration_checks (MMBroadbandModem *self) typedef enum { /* When user requests a disable operation, the process starts here */ DISABLING_STEP_FIRST, + DISABLING_STEP_IFACE_SIMPLE_ABORT_ONGOING, DISABLING_STEP_WAIT_FOR_FINAL_STATE, DISABLING_STEP_DISCONNECT_BEARERS, /* When the disabling is launched due to a failed enable, the process @@ -11423,6 +11424,14 @@ disabling_step (GTask *task) ctx->step++; /* fall through */ + case DISABLING_STEP_IFACE_SIMPLE_ABORT_ONGOING: + /* Connection requests via the Simple interface must be aborted as soon + * as possible, because certain steps may be explicitly waiting for new + * state transitions and such. */ + mm_iface_modem_simple_abort_ongoing (MM_IFACE_MODEM_SIMPLE (ctx->self)); + ctx->step++; + /* fall through */ + case DISABLING_STEP_WAIT_FOR_FINAL_STATE: /* cancellability allowed at this point */ if (g_task_return_error_if_cancelled (task)) { |