From 00201f7e6cce22690fae2b672b5759149ec89df4 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Thu, 15 Nov 2012 22:47:32 +0100 Subject: [PATCH] networkAgent: ensure auto-register is set when the component is enabled Setting auto-register to true launches the initial registration, and will afterwards re-launch the agent registration if NetworkManager gets restarted. When the component is disabled we'll first disable auto-registration, and only then request to unregister. https://bugzilla.gnome.org/show_bug.cgi?id=688379 --- js/ui/components/networkAgent.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/ui/components/networkAgent.js b/js/ui/components/networkAgent.js index 986c4bd63..d1c984643 100644 --- a/js/ui/components/networkAgent.js +++ b/js/ui/components/networkAgent.js @@ -598,7 +598,7 @@ const NetworkAgent = new Lang.Class({ }, enable: function() { - this._native.register(); + this._native.auto_register = true; }, disable: function() { @@ -612,6 +612,7 @@ const NetworkAgent = new Lang.Class({ this._vpnRequests[requestId].cancel(true); this._vpnRequests = { }; + this._native.auto_register = false; this._native.unregister(); },