aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-07-10 08:12:40 +0200
committerAleksander Morgado <aleksander@lanedo.com>2012-08-06 20:06:44 +0200
commit3daed5130fcbbf958c61274199001bd9aa307fbb (patch)
treefa004ab81395c0c3c9a584cddabcd0f8b3336c6a /src
parent66ec5cd724ca82d4b0ad538f0d196833e88624e5 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/mm-plugin-base.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mm-plugin-base.c b/src/mm-plugin-base.c
index 3a289582..8a6f365f 100644
--- a/src/mm-plugin-base.c
+++ b/src/mm-plugin-base.c
@@ -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);
}