From 71cedd4e4a882765862496d77c7f04173ab4712a Mon Sep 17 00:00:00 2001 From: kali Date: Thu, 13 Sep 2012 16:38:22 +0900 Subject: fix race condition on app init still fragile; sometimes the qt app inits faster and make the send command miss the not yet created managemente socket. --- src/leap/baseapp/eip.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/leap/baseapp/eip.py') diff --git a/src/leap/baseapp/eip.py b/src/leap/baseapp/eip.py index 515ae58d..68bd2f24 100644 --- a/src/leap/baseapp/eip.py +++ b/src/leap/baseapp/eip.py @@ -151,13 +151,18 @@ class EIPConductorAppMixin(object): # from openvpn manager) if not self.eip_service_started: + # there is a race condition + # going on here. Depending on how long we take + # to init the qt app, the management socket + # is not ready yet. return if self.conductor.with_errors: #XXX how to wait on pkexec??? #something better that this workaround, plz!! - time.sleep(5) - logger.debug('timeout') + #I removed the pkexec pass authentication at all. + #time.sleep(5) + #logger.debug('timeout') logger.error('errors. disconnect') self.start_or_stopVPN() # is stop -- cgit v1.2.3 From cbd474e49e12e5fc0677dafe331b9c5ab3a2539a Mon Sep 17 00:00:00 2001 From: kali Date: Thu, 20 Sep 2012 03:57:05 +0900 Subject: start hidden, and toggle details window from menu --- src/leap/baseapp/eip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/leap/baseapp/eip.py') diff --git a/src/leap/baseapp/eip.py b/src/leap/baseapp/eip.py index 6c147cb4..6d6b79cb 100644 --- a/src/leap/baseapp/eip.py +++ b/src/leap/baseapp/eip.py @@ -152,7 +152,7 @@ class EIPConductorAppMixin(object): # from openvpn manager) if not self.eip_service_started: - # there is a race condition + # there is a race condition # going on here. Depending on how long we take # to init the qt app, the management socket # is not ready yet. -- cgit v1.2.3 From f2749fa3ff1df5875d3bc0b932a408031fee9874 Mon Sep 17 00:00:00 2001 From: kali Date: Thu, 20 Sep 2012 04:39:50 +0900 Subject: toggle connection on/off --- src/leap/baseapp/eip.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/leap/baseapp/eip.py') diff --git a/src/leap/baseapp/eip.py b/src/leap/baseapp/eip.py index 6d6b79cb..98ff7142 100644 --- a/src/leap/baseapp/eip.py +++ b/src/leap/baseapp/eip.py @@ -216,12 +216,12 @@ class EIPConductorAppMixin(object): if self.debugmode: self.startStopButton.setText('&Disconnect') self.eip_service_started = True + self.toggleEIPAct() # XXX decouple! (timer is init by icons class). # we could bring Timer Init to this Mixin # or to its own Mixin. self.timer.start(constants.TIMER_MILLISECONDS) - return if self.eip_service_started is True: @@ -229,5 +229,6 @@ class EIPConductorAppMixin(object): if self.debugmode: self.startStopButton.setText('&Connect') self.eip_service_started = False + self.toggleEIPAct() self.timer.stop() return -- cgit v1.2.3