[X2Go-Commits] [x2goclient] 02/02: src/onmainwindow.cpp: handle a disabled X.Org Server start limit correctly.
git-admin at x2go.org
git-admin at x2go.org
Sat May 12 02:38:07 CEST 2018
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository x2goclient.
commit 052819840f3490b485d7605f88e18311fb2928f3
Author: Mihai Moldovan <ionic at ionic.de>
Date: Sat May 12 02:36:23 2018 +0200
src/onmainwindow.cpp: handle a disabled X.Org Server start limit correctly.
---
debian/changelog | 2 ++
src/onmainwindow.cpp | 8 ++------
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 24845cb..578c4c8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -63,6 +63,8 @@ x2goclient (4.1.2.0-0x2go1) UNRELEASED; urgency=medium
- src/onmainwindow.{cpp,h}: fix compile error on Windows - use std::size_t
instead of std::ssize_t, treat zero as infinity value while parsing
option value.
+ - src/onmainwindow.cpp: handle a disabled X.Org Server start limit
+ correctly.
* x2goclient.spec:
- Remove plugin references.
* debian/rules:
diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp
index 788751e..2b50576 100644
--- a/src/onmainwindow.cpp
+++ b/src/onmainwindow.cpp
@@ -10094,10 +10094,6 @@ void ONMainWindow::startXOrg (std::size_t start_offset)
waitingForX=0;
x_start_tries_ += 1;
- if (0 == x_start_limit_) {
- x2goWarningf(9) << "X.Org Server start limit set to invalid value zero!";
- }
-
QTimer::singleShot(1000, this, SLOT(slotCheckXOrgConnection()));
}
// #endif
@@ -10113,7 +10109,7 @@ void ONMainWindow::slotCheckXOrgConnection()
* Process died (crashed, terminated, whatever). We need to restart it, unless we already tried
* to do so multiple times unsuccessfully.
*/
- if (x_start_limit_ < x_start_tries_) {
+ if ((x_start_limit_) && (x_start_limit_ < x_start_tries_)) {
x2goDebug << "Unable to start X.Org Server for " << x_start_limit_ << " times, terminating.";
QMessageBox::critical (NULL, QString::null,
@@ -10150,7 +10146,7 @@ void ONMainWindow::slotCheckXOrgConnection()
* continue doing so (with a higher DISPLAY value).
* Otherwise error out.
*/
- if (x_start_limit_ >= x_start_tries_) {
+ if ((!(x_start_limit_)) || (x_start_limit_ >= x_start_tries_)) {
/*
* Server might still be running here, but deleting the QProcess object
* should kill it.
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
More information about the x2go-commits
mailing list