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
This commit is contained in:
parent
5e3111bad8
commit
00201f7e6c
@ -598,7 +598,7 @@ const NetworkAgent = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
enable: function() {
|
enable: function() {
|
||||||
this._native.register();
|
this._native.auto_register = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
disable: function() {
|
disable: function() {
|
||||||
@ -612,6 +612,7 @@ const NetworkAgent = new Lang.Class({
|
|||||||
this._vpnRequests[requestId].cancel(true);
|
this._vpnRequests[requestId].cancel(true);
|
||||||
this._vpnRequests = { };
|
this._vpnRequests = { };
|
||||||
|
|
||||||
|
this._native.auto_register = false;
|
||||||
this._native.unregister();
|
this._native.unregister();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user