aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mm-plugin-anydata.c9
-rw-r--r--plugins/mm-plugin-cinterion.c62
-rw-r--r--plugins/mm-plugin-generic.c9
-rw-r--r--plugins/mm-plugin-gobi.c9
-rw-r--r--plugins/mm-plugin-hso.c9
-rw-r--r--plugins/mm-plugin-huawei.c9
-rw-r--r--plugins/mm-plugin-linktop.c9
-rw-r--r--plugins/mm-plugin-longcheer.c9
-rw-r--r--plugins/mm-plugin-mbm.c9
-rw-r--r--plugins/mm-plugin-moto-c.c11
-rw-r--r--plugins/mm-plugin-nokia.c9
-rw-r--r--plugins/mm-plugin-novatel.c9
-rw-r--r--plugins/mm-plugin-option.c9
-rw-r--r--plugins/mm-plugin-sierra.c9
-rw-r--r--plugins/mm-plugin-simtech.c9
-rw-r--r--plugins/mm-plugin-wavecom.c9
-rw-r--r--plugins/mm-plugin-x22x.c9
-rw-r--r--plugins/mm-plugin-zte.c9
18 files changed, 136 insertions, 81 deletions
diff --git a/plugins/mm-plugin-anydata.c b/plugins/mm-plugin-anydata.c
index d4c7e6df..90f05de0 100644
--- a/plugins/mm-plugin-anydata.c
+++ b/plugins/mm-plugin-anydata.c
@@ -66,7 +66,6 @@ supports_port (MMPluginBase *base,
MMPluginBaseSupportsTask *task)
{
GUdevDevice *port;
- guint32 cached = 0, level;
const char *subsys, *name;
guint16 vendor = 0;
@@ -84,8 +83,12 @@ supports_port (MMPluginBase *base,
if (vendor != 0x16d5)
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, level);
return MM_PLUGIN_SUPPORTS_PORT_IN_PROGRESS;
diff --git a/plugins/mm-plugin-cinterion.c b/plugins/mm-plugin-cinterion.c
index 9992350f..825321ca 100644
--- a/plugins/mm-plugin-cinterion.c
+++ b/plugins/mm-plugin-cinterion.c
@@ -48,14 +48,15 @@ get_level_for_capabilities (guint32 capabilities)
}
static gboolean
-check_vendor_cinterion (MMPluginBase *base,
- GUdevDevice *port)
+check_vendor_cinterion (MMPluginBaseSupportsTask *task)
{
+ MMPluginBase *base;
+ GUdevDevice *port;
const char *subsys, *name;
guint16 vendor = 0;
- gchar *probed_vendor;
- gchar *probed_vendor_strdown;
- gboolean probed_vendor_correct;
+
+ base = MM_PLUGIN_BASE (mm_plugin_base_supports_task_get_plugin (task));
+ port = mm_plugin_base_supports_task_get_port (task);
/* Try to get device IDs from udev. Note that it is not an error
* if we can't get them in our case, as we also support serial
@@ -74,23 +75,29 @@ check_vendor_cinterion (MMPluginBase *base,
/* We may get Cinterion modems connected in RS232 port, try to get
* probed Vendor ID string to check */
- if (!mm_plugin_base_get_cached_product_info (base, port, &probed_vendor, NULL) ||
- !probed_vendor)
- return FALSE;
-
- /* Lowercase the vendor string and compare */
- probed_vendor_strdown = g_utf8_strdown (probed_vendor, -1);
- probed_vendor_correct = ((strstr (probed_vendor_strdown, "cinterion") ||
- strstr (probed_vendor_strdown, "siemens")) ?
- TRUE : FALSE);
- g_free (probed_vendor_strdown);
- g_free (probed_vendor);
-
- if (!probed_vendor_correct)
- return FALSE;
-
- mm_dbg ("Cinterion/Siemens RS232 modem detected");
- return TRUE;
+ if (mm_plugin_base_supports_task_propagate_cached (task)) {
+ const gchar *probed_vendor;
+ gchar *probed_vendor_strdown;
+ gboolean probed_vendor_correct = FALSE;
+
+ probed_vendor = mm_plugin_base_supports_task_get_probed_vendor (task);
+ if (!probed_vendor)
+ return FALSE;
+
+ /* Lowercase the vendor string and compare */
+ probed_vendor_strdown = g_utf8_strdown (probed_vendor, -1);
+ if (strstr (probed_vendor_strdown, "cinterion") ||
+ strstr (probed_vendor_strdown, "siemens")) {
+ mm_dbg ("Cinterion/Siemens RS232 modem detected");
+ probed_vendor_correct = TRUE;
+ }
+
+ g_free (probed_vendor_strdown);
+
+ return probed_vendor_correct;
+ }
+
+ return FALSE;
}
static void
@@ -99,15 +106,12 @@ probe_result (MMPluginBase *base,
guint32 capabilities,
gpointer user_data)
{
- GUdevDevice *port;
-
/* Note: the signal contains only capabilities, but we can also query the
* probed vendor and product strings here. */
/* Check vendor */
- port = mm_plugin_base_supports_task_get_port (task);
mm_plugin_base_supports_task_complete (task,
- (check_vendor_cinterion (base, port) ?
+ (check_vendor_cinterion (task) ?
get_level_for_capabilities (capabilities) : 0));
}
@@ -130,8 +134,8 @@ supports_port (MMPluginBase *base,
* Note that we also relaunch a port probe if we got a cached value but no
* capabilities set (used when trying to detect RS232 modems during
* re-scans). */
- if (!mm_plugin_base_get_cached_port_capabilities (base, port, &cached) ||
- !cached) {
+ if (!mm_plugin_base_supports_task_propagate_cached (task) ||
+ !mm_plugin_base_supports_task_get_probed_capabilities (task)) {
/* Kick off a probe */
if (mm_plugin_base_probe_port (base, task, 100000, NULL))
return MM_PLUGIN_SUPPORTS_PORT_IN_PROGRESS;
@@ -140,7 +144,7 @@ supports_port (MMPluginBase *base,
}
/* Check vendor */
- if (!check_vendor_cinterion (base, port))
+ if (!check_vendor_cinterion (task))
return MM_PLUGIN_SUPPORTS_PORT_UNSUPPORTED;
/* Completed! */
diff --git a/plugins/mm-plugin-generic.c b/plugins/mm-plugin-generic.c
index 89912c2b..54726202 100644
--- a/plugins/mm-plugin-generic.c
+++ b/plugins/mm-plugin-generic.c
@@ -80,15 +80,18 @@ supports_port (MMPluginBase *base,
MMPluginBaseSupportsTask *task)
{
GUdevDevice *port;
- guint32 cached = 0, level;
/* Can't do anything with non-serial ports */
port = mm_plugin_base_supports_task_get_port (task);
if (strcmp (g_udev_device_get_subsystem (port), "tty"))
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, level);
return MM_PLUGIN_SUPPORTS_PORT_IN_PROGRESS;
diff --git a/plugins/mm-plugin-gobi.c b/plugins/mm-plugin-gobi.c
index 06f55852..402f6b19 100644
--- a/plugins/mm-plugin-gobi.c
+++ b/plugins/mm-plugin-gobi.c
@@ -68,7 +68,6 @@ supports_port (MMPluginBase *base,
MMPluginBaseSupportsTask *task)
{
GUdevDevice *port;
- guint32 cached = 0, level;
const char *driver;
/* Can't do anything with non-serial ports */
@@ -80,8 +79,12 @@ supports_port (MMPluginBase *base,
if (!driver || strcmp (driver, "qcserial"))
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, level);
return MM_PLUGIN_SUPPORTS_PORT_IN_PROGRESS;
diff --git a/plugins/mm-plugin-hso.c b/plugins/mm-plugin-hso.c
index a0958029..60d9863b 100644
--- a/plugins/mm-plugin-hso.c
+++ b/plugins/mm-plugin-hso.c
@@ -62,7 +62,6 @@ supports_port (MMPluginBase *base,
MMPluginBaseSupportsTask *task)
{
GUdevDevice *port;
- guint32 cached = 0, level;
const char *driver, *subsys;
port = mm_plugin_base_supports_task_get_port (task);
@@ -78,8 +77,12 @@ supports_port (MMPluginBase *base,
return MM_PLUGIN_SUPPORTS_PORT_IN_PROGRESS;
}
- 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, level);
return MM_PLUGIN_SUPPORTS_PORT_IN_PROGRESS;
diff --git a/plugins/mm-plugin-huawei.c b/plugins/mm-plugin-huawei.c
index aef3c524..285394b9 100644
--- a/plugins/mm-plugin-huawei.c
+++ b/plugins/mm-plugin-huawei.c
@@ -133,7 +133,6 @@ supports_port (MMPluginBase *base,
MMPluginBaseSupportsTask *task)
{
GUdevDevice *port;
- guint32 cached = 0, level;
const char *subsys, *name;
int usbif;
guint16 vendor = 0, product = 0;
@@ -168,8 +167,12 @@ supports_port (MMPluginBase *base,
if (!existing && usbif != 0)
return MM_PLUGIN_SUPPORTS_PORT_DEFER;
- 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, level);
return MM_PLUGIN_SUPPORTS_PORT_IN_PROGRESS;
diff --git a/plugins/mm-plugin-linktop.c b/plugins/mm-plugin-linktop.c
index 8d2e199a..0421dfd6 100644
--- a/plugins/mm-plugin-linktop.c
+++ b/plugins/mm-plugin-linktop.c
@@ -57,7 +57,6 @@ supports_port (MMPluginBase *base,
MMPluginBaseSupportsTask *task)
{
GUdevDevice *port;
- guint32 cached = 0, level;
const char *subsys, *name;
guint16 vendor = 0;
@@ -75,8 +74,12 @@ supports_port (MMPluginBase *base,
if (vendor != 0x230d)
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, level);
return MM_PLUGIN_SUPPORTS_PORT_IN_PROGRESS;
diff --git a/plugins/mm-plugin-longcheer.c b/plugins/mm-plugin-longcheer.c
index 5f773a36..8124edd4 100644
--- a/plugins/mm-plugin-longcheer.c
+++ b/plugins/mm-plugin-longcheer.c
@@ -101,7 +101,6 @@ supports_port (MMPluginBase *base,
MMPluginBaseSupportsTask *task)
{
GUdevDevice *port;
- guint32 cached = 0, level;
guint16 vendor = 0, product = 0;
const char *subsys, *name;
@@ -126,8 +125,12 @@ supports_port (MMPluginBase *base,
if (g_udev_device_get_property_as_boolean (port, "ID_MM_LONGCHEER_TAGGED") == FALSE)
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, level);
return MM_PLUGIN_SUPPORTS_PORT_IN_PROGRESS;
diff --git a/plugins/mm-plugin-mbm.c b/plugins/mm-plugin-mbm.c
index d770ad4d..20ee99e9 100644
--- a/plugins/mm-plugin-mbm.c
+++ b/plugins/mm-plugin-mbm.c
@@ -65,7 +65,6 @@ supports_port (MMPluginBase *base,
GUdevClient *client;
const char *sys[] = { "tty", "net", NULL };
GUdevDevice *port, *physdev;
- guint32 cached = 0, level;
const char *driver, *subsys, *physdev_path;
gboolean is_mbm;
@@ -106,8 +105,12 @@ supports_port (MMPluginBase *base,
return MM_PLUGIN_SUPPORTS_PORT_IN_PROGRESS;
}
- 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, level);
return MM_PLUGIN_SUPPORTS_PORT_IN_PROGRESS;
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;
diff --git a/plugins/mm-plugin-nokia.c b/plugins/mm-plugin-nokia.c
index 28e9022b..f605a233 100644
--- a/plugins/mm-plugin-nokia.c
+++ b/plugins/mm-plugin-nokia.c
@@ -65,7 +65,6 @@ supports_port (MMPluginBase *base,
MMPluginBaseSupportsTask *task)
{
GUdevDevice *port;
- guint32 cached = 0, level;
const char *subsys, *name;
guint16 vendor = 0;
@@ -83,8 +82,12 @@ supports_port (MMPluginBase *base,
if (vendor != 0x0421)
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, level);
return MM_PLUGIN_SUPPORTS_PORT_IN_PROGRESS;
diff --git a/plugins/mm-plugin-novatel.c b/plugins/mm-plugin-novatel.c
index d960addf..3b2b780f 100644
--- a/plugins/mm-plugin-novatel.c
+++ b/plugins/mm-plugin-novatel.c
@@ -67,7 +67,6 @@ supports_port (MMPluginBase *base,
MMPluginBaseSupportsTask *task)
{
GUdevDevice *port;
- guint32 cached = 0, level;
const char *subsys, *name, *driver;
guint16 vendor = 0;
@@ -89,8 +88,12 @@ supports_port (MMPluginBase *base,
if (vendor != 0x1410 && vendor != 0x413c)
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, level);
return MM_PLUGIN_SUPPORTS_PORT_IN_PROGRESS;
diff --git a/plugins/mm-plugin-option.c b/plugins/mm-plugin-option.c
index a819b4ec..0e279c03 100644
--- a/plugins/mm-plugin-option.c
+++ b/plugins/mm-plugin-option.c
@@ -57,7 +57,6 @@ supports_port (MMPluginBase *base,
MMPluginBaseSupportsTask *task)
{
GUdevDevice *port;
- guint32 cached = 0, level;
const char *driver, *subsys, *name;
guint16 vendor = 0;
@@ -79,8 +78,12 @@ supports_port (MMPluginBase *base,
if (vendor != 0x0af0)
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, level);
return MM_PLUGIN_SUPPORTS_PORT_IN_PROGRESS;
diff --git a/plugins/mm-plugin-sierra.c b/plugins/mm-plugin-sierra.c
index 408074b7..9f786b74 100644
--- a/plugins/mm-plugin-sierra.c
+++ b/plugins/mm-plugin-sierra.c
@@ -89,7 +89,6 @@ supports_port (MMPluginBase *base,
MMPluginBaseSupportsTask *task)
{
GUdevDevice *port;
- guint32 cached = 0, level;
const char *driver, *subsys;
/* Can't do anything with non-serial ports */
@@ -112,8 +111,12 @@ supports_port (MMPluginBase *base,
return MM_PLUGIN_SUPPORTS_PORT_IN_PROGRESS;
}
- 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, level);
return MM_PLUGIN_SUPPORTS_PORT_IN_PROGRESS;
diff --git a/plugins/mm-plugin-simtech.c b/plugins/mm-plugin-simtech.c
index 7e2e6346..76ab33d2 100644
--- a/plugins/mm-plugin-simtech.c
+++ b/plugins/mm-plugin-simtech.c
@@ -68,7 +68,6 @@ supports_port (MMPluginBase *base,
MMPluginBaseSupportsTask *task)
{
GUdevDevice *port;
- guint32 cached = 0, level;
guint16 vendor = 0;
const char *subsys, *name;
@@ -87,8 +86,12 @@ supports_port (MMPluginBase *base,
if (vendor != 0x1e0e)
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, level);
return MM_PLUGIN_SUPPORTS_PORT_IN_PROGRESS;
diff --git a/plugins/mm-plugin-wavecom.c b/plugins/mm-plugin-wavecom.c
index c7e3f4ab..8cbf4f5e 100644
--- a/plugins/mm-plugin-wavecom.c
+++ b/plugins/mm-plugin-wavecom.c
@@ -60,7 +60,6 @@ supports_port (MMPluginBase *base,
MMPluginBaseSupportsTask *task)
{
GUdevDevice *port;
- guint32 cached = 0, level;
const char *subsys, *name;
guint16 vendor = 0;
@@ -79,8 +78,12 @@ supports_port (MMPluginBase *base,
if (vendor != 0x114f)
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, level);
return MM_PLUGIN_SUPPORTS_PORT_IN_PROGRESS;
diff --git a/plugins/mm-plugin-x22x.c b/plugins/mm-plugin-x22x.c
index 3be67312..059bb51e 100644
--- a/plugins/mm-plugin-x22x.c
+++ b/plugins/mm-plugin-x22x.c
@@ -98,7 +98,6 @@ supports_port (MMPluginBase *base,
MMPluginBaseSupportsTask *task)
{
GUdevDevice *port;
- guint32 cached = 0, level;
guint16 vendor = 0, product = 0;
const char *subsys, *name;
@@ -121,8 +120,12 @@ supports_port (MMPluginBase *base,
if (!g_udev_device_get_property_as_boolean (port, "ID_MM_X22X_TAGGED"))
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, level);
return MM_PLUGIN_SUPPORTS_PORT_IN_PROGRESS;
diff --git a/plugins/mm-plugin-zte.c b/plugins/mm-plugin-zte.c
index 9c390a37..4d8107e4 100644
--- a/plugins/mm-plugin-zte.c
+++ b/plugins/mm-plugin-zte.c
@@ -83,7 +83,6 @@ supports_port (MMPluginBase *base,
MMPluginBaseSupportsTask *task)
{
GUdevDevice *port;
- guint32 cached = 0, level;
guint16 vendor = 0;
const char *subsys, *name;
@@ -112,8 +111,12 @@ supports_port (MMPluginBase *base,
if (strcmp (subsys, "tty"))
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, level);
return MM_PLUGIN_SUPPORTS_PORT_IN_PROGRESS;