diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2011-12-30 18:33:21 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-03-15 14:14:41 +0100 |
commit | 5c1d18d15675d43d9b3bb42adf6911e03823ad88 (patch) | |
tree | aca5045c558fbbe6d07a1198005640f1a72d19a5 | |
parent | 51dc93e3d50129a25985e84a4c8953392a975af6 (diff) |
port-probe: store the task always before completing it
If we already got all needed probing results, we complete the task without
launching any new probing, but still, we need to store it internally so
that it's properly disposed.
-rw-r--r-- | src/mm-port-probe.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mm-port-probe.c b/src/mm-port-probe.c index e56f1879..3fef5cb5 100644 --- a/src/mm-port-probe.c +++ b/src/mm-port-probe.c @@ -736,6 +736,10 @@ mm_port_probe_run (MMPortProbe *self, } } + /* Store as current task. We need to keep it internally, as it will be + * freed during _finish() when the operation is completed. */ + self->priv->task = task; + /* All requested probings already available? If so, we're done */ if (!task->flags) { port_probe_run_task_complete (task, TRUE, NULL); @@ -745,9 +749,6 @@ mm_port_probe_run (MMPortProbe *self, /* Setup internal cancellable */ task->cancellable = g_cancellable_new (); - /* Store as current task */ - self->priv->task = task; - /* If any AT-specific probing requested, require generic AT check before */ if (task->flags & (MM_PORT_PROBE_AT_VENDOR | MM_PORT_PROBE_AT_PRODUCT)) { |