diff options
author | Dan Williams <dcbw@redhat.com> | 2012-10-03 18:35:07 -0500 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2012-10-03 18:35:07 -0500 |
commit | f6d9f53369200ba277a48de3a24c377799765559 (patch) | |
tree | 71f98b5604de420120ef92c7558f4e822bc51d5b | |
parent | ff8c60641aa2ea41080c15f81f633b3f78e07bf8 (diff) | |
download | ModemManager-f6d9f53369200ba277a48de3a24c377799765559.tar.gz |
core: stop probing if a Modem has already been created for a port (bgo #685398)
If a port finishes probing from the first plugin, and then starts
being probed by a second plugin, and then a different port finishes
probing and creates a Modem object for that device, always let the
Modem object's plugin grab the port and ignore any other plugin.
Only one plugin may control modem ports.
-rw-r--r-- | src/mm-manager.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mm-manager.c b/src/mm-manager.c index 728a115e8..e13d1f772 100644 --- a/src/mm-manager.c +++ b/src/mm-manager.c @@ -703,6 +703,14 @@ supports_callback (MMPlugin *plugin, * supports it. */ next_plugin = existing_plugin; + } else if (plugin != existing_plugin) { + /* A modem object may have been created by one of this device's other + * ports while this port was getting probed; now that we have a + * modem, just use the modem's plugin and ignore this plugin + * completely. All ports of a modem must be handled by the same + * plugin. + */ + next_plugin = NULL; } else { mm_dbg ("(%s/%s): plugin %p (%s) existing %p (%s) info->best %p (%s)", info->subsys, info->name, |