diff options
author | Ben Chan <benchan@chromium.org> | 2014-01-10 16:55:44 -0800 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2014-01-11 23:33:35 +0100 |
commit | 5c00736f4402eae5ea15861f376239ae73cf8aa0 (patch) | |
tree | 48441a5daca5d11f8c9cf787a200c1e1ce43794c /src/mm-sim.c | |
parent | 50f3f41c3a857caf9403ef943b4832735fb4ffba (diff) |
iface-modem,sim: make SIM interface initialization cancellable
Diffstat (limited to 'src/mm-sim.c')
-rw-r--r-- | src/mm-sim.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mm-sim.c b/src/mm-sim.c index da667e22..7cd84ffe 100644 --- a/src/mm-sim.c +++ b/src/mm-sim.c @@ -1468,6 +1468,16 @@ STR_REPLY_READY_FN (operator_name, "Operator name") static void interface_initialization_step (InitAsyncContext *ctx) { + if (g_cancellable_is_cancelled (ctx->cancellable)) { + g_simple_async_result_set_error (ctx->result, + MM_CORE_ERROR, + MM_CORE_ERROR_CANCELLED, + "Interface initialization cancelled"); + g_simple_async_result_complete_in_idle (ctx->result); + init_async_context_free (ctx); + return; + } + switch (ctx->step) { case INITIALIZATION_STEP_FIRST: /* Fall down to next step */ |