From 21ee2de9986852fe42082b1c891c2e69b59e12f5 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Sat, 22 Aug 2015 20:45:25 +0530 Subject: [PATCH] networks: Don't re-add settings if they exist - This is a probable reason why a phantom new connection show up sometimes. --- plinth/network.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plinth/network.py b/plinth/network.py index 79d38429f..585d351f9 100644 --- a/plinth/network.py +++ b/plinth/network.py @@ -199,21 +199,21 @@ def _update_pppoe_settings(connection, connection_uuid, name, interface, zone, settings = connection.get_setting_pppoe() if not settings: settings = nm.SettingPppoe.new() + connection.add_setting(settings) settings.set_property(nm.SETTING_PPPOE_USERNAME, username) settings.set_property(nm.SETTING_PPPOE_PASSWORD, password) - connection.add_setting(settings) settings = connection.get_setting_ppp() if not settings: settings = nm.SettingPpp.new() + connection.add_setting(settings) #ToDo: make this configurable? #ToDo: apt-get install ppp pppoe settings.set_property(nm.SETTING_PPP_LCP_ECHO_FAILURE, 5) settings.set_property(nm.SETTING_PPP_LCP_ECHO_INTERVAL, 30) - connection.add_setting(settings) return connection