From 3daed5130fcbbf958c61274199001bd9aa307fbb Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Tue, 10 Jul 2012 08:12:40 +0200 Subject: 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. --- src/mm-plugin-base.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src') 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); } -- cgit v1.2.3-70-g09d2