From def181bd9c0dc9639ebe24c82a20f6e0860bf3fb Mon Sep 17 00:00:00 2001 From: maroy Date: Fri, 15 Apr 2005 15:13:01 +0000 Subject: [PATCH] added workaround for when the client can't access the scheduler (and tries to display the time). fix for issue #810 see http://bugs.campware.org/view.php?id=810 --- .../gLiveSupport/src/MasterPanelWindow.cxx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/livesupport/products/gLiveSupport/src/MasterPanelWindow.cxx b/livesupport/products/gLiveSupport/src/MasterPanelWindow.cxx index 5f48e1468..24c0ec85c 100644 --- a/livesupport/products/gLiveSupport/src/MasterPanelWindow.cxx +++ b/livesupport/products/gLiveSupport/src/MasterPanelWindow.cxx @@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Author : $Author: fgerlits $ - Version : $Revision: 1.17 $ + Author : $Author: maroy $ + Version : $Revision: 1.18 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/MasterPanelWindow.cxx,v $ ------------------------------------------------------------------------------*/ @@ -267,9 +267,14 @@ MasterPanelWindow :: resetTimer(void) throw () bool MasterPanelWindow :: onUpdateTime(int dummy) throw () { - Ptr::Ref now = gLiveSupport->getScheduler() - ->getSchedulerTime(); - + Ptr::Ref now; + + try { + now = gLiveSupport->getScheduler()->getSchedulerTime(); + } catch (XmlRpcException &e) { + // TODO: handle error + } + if (now.get()) { time_duration dayTime = now->time_of_day(); // get the time of day, only up to a second precision