plugin-base: don't assume a plugin will give as supported all ports of the device

E.g. the Generic plugin will give as unsupported 'net' ports found in the
device, as it doesn't know how to use them.
This commit is contained in:
Aleksander Morgado
2012-07-10 08:12:40 +02:00
parent 66ec5cd724
commit 3daed5130f

View File

@@ -780,8 +780,13 @@ create_modem (MMPlugin *self,
key = get_key (subsys, name);
probe = g_hash_table_lookup (priv->tasks, key);
g_assert (probe);
probes = g_list_prepend (probes, g_object_ref (probe));
if (!probe)
mm_warn ("(%s/%s) Ignoring port when creating modem with plugin '%s'",
subsys,
name,
priv->name);
else
probes = g_list_prepend (probes, g_object_ref (probe));
g_free (key);
}