aboutsummaryrefslogtreecommitdiff
path: root/src/mm-plugin-manager.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2016-01-15 17:54:51 +0100
committerAleksander Morgado <aleksander@aleksander.es>2016-03-09 23:59:46 +0100
commitd3bf07e7a87bac85778750a87463b95f2180c55c (patch)
tree8f72a3161b36be28584ebab24fa5ce5f42fd1df3 /src/mm-plugin-manager.c
parentfd4fdbf21b20983cdd46fc925389dd96ca3a99d3 (diff)
plugin: allow cancellation of the port probe operation
Diffstat (limited to 'src/mm-plugin-manager.c')
-rw-r--r--src/mm-plugin-manager.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mm-plugin-manager.c b/src/mm-plugin-manager.c
index 636af09b..abf714d6 100644
--- a/src/mm-plugin-manager.c
+++ b/src/mm-plugin-manager.c
@@ -465,6 +465,7 @@ plugin_supports_port_ready (MMPlugin *plugin,
/* Get supports check results */
support_result = mm_plugin_supports_port_finish (plugin, res, &error);
if (error) {
+ g_assert_cmpuint (support_result, ==, MM_PLUGIN_SUPPORTS_PORT_UNKNOWN);
mm_warn ("[plugin manager] task %s: error when checking support with plugin '%s': '%s'",
port_context->name, mm_plugin_get_name (plugin), error->message);
g_error_free (error);
@@ -474,6 +475,7 @@ plugin_supports_port_ready (MMPlugin *plugin,
case MM_PLUGIN_SUPPORTS_PORT_SUPPORTED:
port_context_supported (port_context, plugin);
break;
+ case MM_PLUGIN_SUPPORTS_PORT_UNKNOWN:
case MM_PLUGIN_SUPPORTS_PORT_UNSUPPORTED:
port_context_unsupported (port_context, plugin);
break;
@@ -518,6 +520,7 @@ port_context_next (PortContext *port_context)
mm_plugin_supports_port (plugin,
port_context->device,
port_context->port,
+ port_context->cancellable,
(GAsyncReadyCallback) plugin_supports_port_ready,
port_context_ref (port_context));
}