diff options
author | Dan Williams <dcbw@redhat.com> | 2010-03-30 15:03:35 -0700 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2010-03-30 15:03:35 -0700 |
commit | df08f6a43ff8acc617f7330d25450a3a62809ffb (patch) | |
tree | 77756e63b5258655b3c76a8aff445f58b81983e9 /src/mm-manager.c | |
parent | 720e38aec0a50aa2136f01b7f3620a4e261c0406 (diff) |
core: find the existing modem for a port in the manager
Diffstat (limited to 'src/mm-manager.c')
-rw-r--r-- | src/mm-manager.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mm-manager.c b/src/mm-manager.c index 5a85f02a..bb1137e0 100644 --- a/src/mm-manager.c +++ b/src/mm-manager.c @@ -383,11 +383,15 @@ try_supports_port (MMManager *manager, SupportsInfo *info) { MMPluginSupportsResult result; + MMModem *existing; + + existing = find_modem_for_device (manager, info->physdev_path); result = mm_plugin_supports_port (plugin, info->subsys, info->name, info->physdev_path, + existing, supports_callback, info); @@ -426,8 +430,12 @@ do_grab_port (gpointer user_data) /* No more plugins to try */ if (info->best_plugin) { + MMModem *existing; + + existing = g_hash_table_lookup (priv->modems, info->physdev_path); + /* Create the modem */ - modem = mm_plugin_grab_port (info->best_plugin, info->subsys, info->name, &error); + modem = mm_plugin_grab_port (info->best_plugin, info->subsys, info->name, existing, &error); if (modem) { guint32 modem_type = MM_MODEM_TYPE_UNKNOWN; const char *type_name = "UNKNOWN"; |