diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2013-10-28 18:13:14 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2013-10-28 18:13:14 +0100 |
commit | b09044bcb3153e17e7b75ef1a22402027e3f4d8f (patch) | |
tree | 1547410b17f47c9cf4b1d81e10f8d707671070d1 /src/mm-plugin.c | |
parent | 9c2be510f6324b288d45f4d424c15ec5f865b5f3 (diff) |
plugin: for non-AT ports, don't expect vendor/product string probing
When running the pre-probing VID/PID filters, the ports were not filtered out if
the plugin had configured post-probing vendor/product string filters. But, these
post-probing filters are only applicable to AT ports.
From now on, this logic will not be applied to non-serial ports. In other words,
pre-probing VID/PID filters applied to non-serial ports will always result in
the port being filtered out or being allowed, regardless of any additional
vendor/product string post-probing filter configured by the plugin.
https://bugzilla.gnome.org/show_bug.cgi?id=710437
Diffstat (limited to 'src/mm-plugin.c')
-rw-r--r-- | src/mm-plugin.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/mm-plugin.c b/src/mm-plugin.c index 9c280058..7318985e 100644 --- a/src/mm-plugin.c +++ b/src/mm-plugin.c @@ -311,12 +311,17 @@ apply_pre_probing_filters (MMPlugin *self, } } - /* If we got filtered by vendor or product IDs and we do not have vendor - * or product strings to compare with: unsupported */ + /* If we got filtered by vendor or product IDs; mark it as unsupported only if: + * a) we do not have vendor or product strings to compare with (i.e. plugin + * doesn't have explicit vendor/product strings + * b) the port is NOT an AT port which we can use for AT probing + */ if ((vendor_filtered || product_filtered) && - !self->priv->vendor_strings && - !self->priv->product_strings && - !self->priv->forbidden_product_strings) { + ((!self->priv->vendor_strings && + !self->priv->product_strings && + !self->priv->forbidden_product_strings) || + g_str_equal (g_udev_device_get_subsystem (port), "net") || + g_str_has_prefix (g_udev_device_get_name (port), "cdc-wdm"))) { mm_dbg ("(%s) [%s] filtered by vendor/product IDs", self->priv->name, g_udev_device_get_name (port)); |