[X2Go-Commits] [x2goclient] 09/10: src/onmainwindow.cpp: let startSshd () act as a wrapper and be called multiple times.
git-admin at x2go.org
git-admin at x2go.org
Sat Sep 24 23:25:28 CEST 2016
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch bugfix/osx
in repository x2goclient.
commit 7b1e9999bd9542e2a2e13dbe4cb4acb799561e7b
Author: Mihai Moldovan <ionic at ionic.de>
Date: Sat Sep 24 23:04:46 2016 +0200
src/onmainwindow.cpp: let startSshd () act as a wrapper and be called multiple times.
Check if the OpenSSH Server is already running and return true,
otherwise try to start it.
---
debian/changelog | 3 +++
src/onmainwindow.cpp | 13 +++++++++++++
2 files changed, 16 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 81c5357..3bd55a3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -419,6 +419,9 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium
- src/onmainwindow.{cpp,h}: reformat generateKey () only.
- src/onmainwindow.{cpp,h}: move createRSAKey () around.
- src/onmainwindow.{cpp,h}: reformat createRSAKey () only.
+ - src/onmainwindow.cpp: let startSshd () act as a wrapper and be called
+ multiple times. Check if the OpenSSH Server is already running and
+ return true, otherwise try to start it.
-- X2Go Release Manager <git-admin at x2go.org> Mon, 19 Sep 2016 09:07:07 +0200
diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp
index 34ca077..1720855 100644
--- a/src/onmainwindow.cpp
+++ b/src/onmainwindow.cpp
@@ -10420,6 +10420,19 @@ bool ONMainWindow::startSshd()
{
return false;
}
+
+ /* Don't start sshd, if it's already running. */
+#ifdef Q_OS_WIN
+ if (winSshdStarted)
+#else /* defined (Q_OS_WIN) */
+ if (sshd)
+#endif /* defined (Q_OS_WIN) */
+ {
+ if (isServerRunning (clientSshPort.toInt ())) {
+ return (true);
+ }
+ }
+
clientSshPort = "7022";
QString etcDir=homeDir+"/.x2go/etc";
int port=clientSshPort.toInt();
--
Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
More information about the x2go-commits
mailing list