[X2Go-Commits] [x2goclient] 237/239: src/onmainwindow.cpp: let startSshd () act as a wrapper and be called multiple times.
git-admin at x2go.org
git-admin at x2go.org
Mon Oct 24 23:28:07 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 9d023fdb6d1a915ba2a15dbb59544ea8984cd02e
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 1f05046..7257b59 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.
[ Bernard Cafarelli ]
* New upstream version (4.0.5.3):
diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp
index 2c1e88c..5362b3e 100644
--- a/src/onmainwindow.cpp
+++ b/src/onmainwindow.cpp
@@ -10443,6 +10443,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