[gnome-control-center] network: prevent ethernet device to switch back to 'on' state



commit d1bbe9514331c7420786aab831a568ded2dc71c6
Author: Lionel Landwerlin <llandwerlin gmail com>
Date:   Tue May 14 19:46:17 2013 +0100

    network: prevent ethernet device to switch back to 'on' state
    
    Calling nm_client_deactivate_connection() stops a connection and set
    it back to auto-activation. In the case of ethernet, that means the
    ipconfig scripts start again and the ethernet device becomes 'on'
    again, even though the user clicked 'off' in the control center panel.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=700300

 panels/network/net-device-ethernet.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
---
diff --git a/panels/network/net-device-ethernet.c b/panels/network/net-device-ethernet.c
index e525b3e..092b0d5 100644
--- a/panels/network/net-device-ethernet.c
+++ b/panels/network/net-device-ethernet.c
@@ -520,7 +520,6 @@ device_off_toggled (GtkSwitch         *sw,
         NMClient *client;
         NMDevice *nm_device;
         NMConnection *connection;
-        NMActiveConnection *a;
 
         if (device->updating_device)
                 return;
@@ -537,10 +536,7 @@ device_off_toggled (GtkSwitch         *sw,
                                                        NULL, NULL, NULL);
                 }
         } else {
-                a = nm_device_get_active_connection (nm_device);
-                if (a) {
-                        nm_client_deactivate_connection (client, a);
-                }
+                nm_device_disconnect (nm_device, NULL, NULL);
         }
 }
 


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