[network-manager-applet/nma-0-9-8] applet: MM1 doesn't need to be running for broadband class methods (bgo #694676)



commit ca74b18820cbd6e4babf0ff7c571bf7ae7d4e80e
Author: Dan Williams <dcbw redhat com>
Date:   Thu Feb 28 10:46:58 2013 +0100

    applet: MM1 doesn't need to be running for broadband class methods (bgo #694676)
    
    The applet device classes are used for a number of things from UI
    display to device activation, not all of which require ModemManager
    to be running.  In this case, the nature of IPC means that the
    applet may notice that MM1 has quit before it gets the NM signal
    that the mobile broadband device has been removed.  Then the NM
    signal comes in, and the applet needs to ask the MB device class
    what to do with that event, and we crash because the device class
    no longer exists because MM1 isn't running.  But there's no good
    reason to tie the device class to the lifetime of MM1.

 src/applet.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/src/applet.c b/src/applet.c
index 080c5a7..86d9c14 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -243,12 +243,8 @@ get_device_class (NMDevice *device, NMApplet *applet)
                NMDeviceModemCapabilities caps;
 
 #if WITH_MODEM_MANAGER_1
-               if (g_str_has_prefix (nm_device_get_udi (device), "/org/freedesktop/ModemManager1/Modem/")) {
-                       if (applet->mm1_running)
-                               return applet->broadband_class;
-                       g_message ("%s: ModemManager was not found", __func__);
-                       return NULL;
-               }
+               if (g_str_has_prefix (nm_device_get_udi (device), "/org/freedesktop/ModemManager1/Modem/"))
+                       return applet->broadband_class;
 #endif
 
                caps = nm_device_modem_get_current_capabilities (NM_DEVICE_MODEM (device));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]