aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mm-plugin-manager.c8
-rw-r--r--src/mm-plugin-manager.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/src/mm-plugin-manager.c b/src/mm-plugin-manager.c
index 0b43aa46..5d3f30fc 100644
--- a/src/mm-plugin-manager.c
+++ b/src/mm-plugin-manager.c
@@ -368,6 +368,7 @@ mm_plugin_manager_find_port_support (MMPluginManager *self,
const gchar *subsys,
const gchar *name,
const gchar *physdev_path,
+ MMPlugin *suggested_plugin,
MMModem *existing,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -382,6 +383,7 @@ mm_plugin_manager_find_port_support (MMPluginManager *self,
info->subsys = g_strdup (subsys);
info->name = g_strdup (name);
info->physdev_path = g_strdup (physdev_path);
+ info->suggested_plugin = suggested_plugin;
if (existing)
info->existing = g_object_ref (existing);
info->result = g_simple_async_result_new (G_OBJECT (self),
@@ -392,6 +394,12 @@ mm_plugin_manager_find_port_support (MMPluginManager *self,
/* Set first plugin to check */
info->current = self->priv->plugins;
+ /* If we got one suggested, it will be the first one */
+ if (info->suggested_plugin) {
+ info->current = g_slist_find (info->current,
+ info->suggested_plugin);
+ }
+
/* We will keep track of the supports info internally.
* Ownership of the supports info will belong to the manager now. */
add_supports_info (self, info);
diff --git a/src/mm-plugin-manager.h b/src/mm-plugin-manager.h
index 673ec932..825e69c6 100644
--- a/src/mm-plugin-manager.h
+++ b/src/mm-plugin-manager.h
@@ -51,6 +51,7 @@ void mm_plugin_manager_find_port_support (MMPluginManager *self,
const gchar *subsys,
const gchar *name,
const gchar *physdev_path,
+ MMPlugin *suggested_plugin,
MMModem *existing,
GAsyncReadyCallback callback,
gpointer user_data);