mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 11:08:03 +02:00
wwan: cancel asyncronous request in connect_context_clear()
priv->ctx->cancellable is passed to mm_sim_send_pin() to cancel the operation. We must cancel the operation when the context/response is no longer relevant. Especially, as we don't take a reference on @self during the asyncronous request.
This commit is contained in:
parent
eede9a7c78
commit
80a2b27da9
1 changed files with 2 additions and 2 deletions
|
|
@ -288,7 +288,7 @@ connect_context_clear (NMModemBroadband *self)
|
|||
|
||||
g_clear_error (&ctx->first_error);
|
||||
g_clear_pointer (&ctx->ip_types, (GDestroyNotify) g_array_unref);
|
||||
g_clear_object (&ctx->cancellable);
|
||||
nm_clear_g_cancellable (&ctx->cancellable);
|
||||
g_clear_object (&ctx->connection);
|
||||
g_clear_object (&ctx->connect_properties);
|
||||
g_clear_object (&ctx->self);
|
||||
|
|
@ -389,7 +389,7 @@ send_pin_ready (MMSim *sim, GAsyncResult *result, NMModemBroadband *self)
|
|||
return;
|
||||
|
||||
if (!self->priv->ctx || self->priv->ctx->step != CONNECT_STEP_UNLOCK)
|
||||
return;
|
||||
g_return_if_reached ();
|
||||
|
||||
if (error) {
|
||||
if (g_error_matches (error, MM_MOBILE_EQUIPMENT_ERROR, MM_MOBILE_EQUIPMENT_ERROR_SIM_PIN) ||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue