From cd1396d10ac87d5f0afc435018c1ed4a3f522c5d Mon Sep 17 00:00:00 2001 From: jjl Date: Thu, 23 Sep 2010 18:46:02 +0200 Subject: [PVSGUI] restart pvs daemon on startup --- src/pvsDaemon.cpp | 2 +- src/pvsgui.cpp | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/pvsDaemon.cpp b/src/pvsDaemon.cpp index c975a9e..584a65d 100644 --- a/src/pvsDaemon.cpp +++ b/src/pvsDaemon.cpp @@ -150,7 +150,7 @@ int main(int argc, char** argv) if (com.server()) { // wont work, no daemon running - qDebug("Error. No running PVS-Client found. Exiting."); + qDebug("No running PVS-Client found. Exiting."); com.stop(); } else diff --git a/src/pvsgui.cpp b/src/pvsgui.cpp index 5b11104..30ba4ed 100644 --- a/src/pvsgui.cpp +++ b/src/pvsgui.cpp @@ -31,6 +31,10 @@ PVSGUI::PVSGUI(QWidget *parent) : QFile::copy("/etc/openslx/pvsgui.conf", _settings.fileName()); } + // stop running pvs + qDebug("[%s] Stopping pvs daemon.", metaObject()->className()); + QProcess::execute("pvs -c stop"); + _menu = new QMenu(this); _hostMenu = new QMenu(tr("Connect"), this); _hosts = new QHash (); @@ -58,7 +62,8 @@ PVSGUI::PVSGUI(QWidget *parent) : else qDebug("[%s] ERROR: Could not connect to DBus!", metaObject()->className()); - // start pvs if not running + // start pvs daemon + qDebug("[%s] Starting pvs daemon.", metaObject()->className()); QDBusPendingReply reply0 = _ifaceDBus->start(); reply0.waitForFinished(); if (reply0.isValid() && reply0.value()) -- cgit v1.2.3-55-g7522