From 4753f7360b7809e4efc62bcff6d5d1194524b83f Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 30 Mar 2010 23:28:26 -0700 Subject: core: don't re-export modems after db413acc4e9d364e1c4ecdde0da3fade012912ab If a port is found by the kernel after the modem is already exported, make sure we don't re-export the modem after the tardy port is handled. --- src/mm-manager.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/mm-manager.c b/src/mm-manager.c index 6fd49856..abcb8cd1 100644 --- a/src/mm-manager.c +++ b/src/mm-manager.c @@ -240,6 +240,12 @@ check_export_modem (MMManager *self, MMModem *modem) } } + /* Already exported? This can happen if the modem is exported and the kernel + * discovers another of the modem's ports. + */ + if (g_object_get_data (G_OBJECT (modem), DBUS_PATH_TAG)) + return; + /* No outstanding port tasks, so if the modem is valid we can export it */ if (mm_modem_get_valid (modem)) { static guint32 id = 0; -- cgit v1.2.3-70-g09d2