From 45a460a671fbb9e05351b2e58dca20fd6a86e858 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Tue, 2 Apr 2024 16:26:54 +0300 Subject: [PATCH] libs: pass the port number to ksysguardd from KSGRD::SensorShellAgent::start() why was it not passed? also the process of starting ksysguardd could fail but true was returned anyway.. Signed-off-by: Ivailo Monev --- libs/ksysguard/ksgrd/SensorShellAgent.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/ksysguard/ksgrd/SensorShellAgent.cpp b/libs/ksysguard/ksgrd/SensorShellAgent.cpp index 8eb09dad..a5c8a526 100644 --- a/libs/ksysguard/ksgrd/SensorShellAgent.cpp +++ b/libs/ksysguard/ksgrd/SensorShellAgent.cpp @@ -47,7 +47,7 @@ SensorShellAgent::~SensorShellAgent() } bool SensorShellAgent::start( const QString &host, const QString &shell, - const QString &command, int ) + const QString &command, int port) { mDaemon = new QProcess(); mDaemon->setProcessChannelMode( QProcess::SeparateChannels ); @@ -71,12 +71,12 @@ bool SensorShellAgent::start( const QString &host, const QString &shell, QString program = args.takeAt(0); mDaemon->start(program, args); } else { - mArgs = mShell + " " + hostName() + " ksysguardd"; + mArgs = mShell + " " + hostName() + " ksysguardd -p" + port; mDaemon->start(mShell, QStringList() << hostName() << "ksysguardd"); } - return true; + return mDaemon->waitForStarted(); } void SensorShellAgent::hostInfo( QString &shell, QString &command,