filter: additional strict rules when all device ports available

All the previous filter rules were applicable per-port independently.
But, we also want to apply rules on a port based on the existence of
other ports on the same device (e.g. allow TTY if the device also has
a NET port). In this case, we need to wait for all ports to appear and
then apply the additional rules.

We re-use the "min wait time" timeout in the plugin-manager for this
same purpose. This timeout is setup to wait for ports to appear before
starting the probing process (e.g. so that plugin filters like the
forbidden-drivers one work). The very same timeout can therefore be
used to check whether we start the probing or not based on additional
filter rules.
This commit is contained in:
Aleksander Morgado
2017-12-05 10:58:29 +01:00
parent ee570d44dc
commit 0850fe4f6d
5 changed files with 95 additions and 10 deletions
+1 -1
View File
@@ -1144,7 +1144,7 @@ initable_init (GInitable *initable,
return FALSE;
/* Create plugin manager */
priv->plugin_manager = mm_plugin_manager_new (priv->plugin_dir, error);
priv->plugin_manager = mm_plugin_manager_new (priv->plugin_dir, priv->filter, error);
if (!priv->plugin_manager)
return FALSE;