aboutsummaryrefslogtreecommitdiff
path: root/plugins/mm-plugin-moto-c.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mm-plugin-moto-c.c')
-rw-r--r--plugins/mm-plugin-moto-c.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/plugins/mm-plugin-moto-c.c b/plugins/mm-plugin-moto-c.c
index f308b9de..265630c0 100644
--- a/plugins/mm-plugin-moto-c.c
+++ b/plugins/mm-plugin-moto-c.c
@@ -61,7 +61,6 @@ supports_port (MMPluginBase *base,
{
GUdevDevice *port;
const char *tmp;
- guint32 cached = 0, level;
/* Can't do anything with non-serial ports */
port = mm_plugin_base_supports_task_get_port (task);
@@ -80,10 +79,14 @@ supports_port (MMPluginBase *base,
if (!tmp || (strcmp (tmp, "3802") && strcmp (tmp, "4902")))
return MM_PLUGIN_SUPPORTS_PORT_UNSUPPORTED;
- if (mm_plugin_base_get_cached_port_capabilities (base, port, &cached)) {
- level = get_level_for_capabilities (cached);
+ /* Check if a previous probing was already launched in this port */
+ if (mm_plugin_base_supports_task_propagate_cached (task)) {
+ guint32 level;
+
+ /* A previous probing was already done, use its results */
+ level = get_level_for_capabilities (mm_plugin_base_supports_task_get_probed_capabilities (task));
if (level) {
- mm_plugin_base_supports_task_complete (task, 10);
+ mm_plugin_base_supports_task_complete (task, level);
return MM_PLUGIN_SUPPORTS_PORT_IN_PROGRESS;
}
return MM_PLUGIN_SUPPORTS_PORT_UNSUPPORTED;