This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch bugfix/osx
in repository x2goclient.

commit c65e647c05ee529de923481a6304669ff22f4763
Author: Mihai Moldovan <io...@ionic.de>
Date:   Fri Sep 23 03:12:43 2016 +0200

    src/onmainwindow.cpp: add more error handling to generateKey () and fix up 
a broken error-handling section.
---
 debian/changelog     |    2 ++
 src/onmainwindow.cpp |   30 +++++++++++++++++++++++++++++-
 2 files changed, 31 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index c129a00..08d3d80 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -392,6 +392,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium
       value.) Change all locations referencing generateKey () to use the
       return value (if necessary) and remove dead code that was used to
       generate a user key manually previously.
+    - src/onmainwindow.cpp: add more error handling to generateKey () and fix
+      up a broken error-handling section.
 
  -- X2Go Release Manager <git-ad...@x2go.org>  Mon, 19 Sep 2016 09:07:07 +0200
 
diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp
index 23485f0..15274ba 100644
--- a/src/onmainwindow.cpp
+++ b/src/onmainwindow.cpp
@@ -10324,6 +10324,7 @@ QString 
ONMainWindow::generateKey(ONMainWindow::key_types key_type, bool host_ke
                                    tr ("Unable to create SSH key base 
directory '%1'.").arg (base_dir)
                                    + "\n"
                                    + tr ("Terminating application."));
+            close ();
         }
     }
 
@@ -10387,7 +10388,34 @@ QString 
ONMainWindow::generateKey(ONMainWindow::key_types key_type, bool host_ke
              << comment
              << "-f"
              << private_key_file;
-        QProcess::execute ("ssh-keygen", args);
+
+        const int keygen_ret = QProcess::execute ("ssh-keygen", args);
+
+        if (-2 == keygen_ret) {
+            QMessageBox::critical (this, tr ("ssh-keygen launching error"),
+                                   tr ("Unable to start the ssh-keygen 
binary.")
+                                   + "\n"
+                                   + tr ("Terminating application."));
+            close ();
+        }
+
+        if (-1 == keygen_ret) {
+            QMessageBox::critical (this, tr ("ssh-keygen crashed"),
+                                   tr ("The ssh-keygen binary crashed.")
+                                   + "\n"
+                                   + tr ("Terminating application."));
+            close ();
+        }
+
+        if (0 != keygen_ret) {
+            QMessageBox::critical (this, tr ("ssh-keygen program error"),
+                                   tr ("The ssh-keygen binary did not exit 
cleanly.")
+                                   + " "
+                                   + tr ("It was probably called with unknown 
arguments.")
+                                   + "\n"
+                                   + tr ("Terminating application."));
+            close ();
+        }
     }
 
     return (ret);

--
Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email 
on /srv/git/code.x2go.org/x2goclient.git
_______________________________________________
x2go-commits mailing list
x2go-commits@lists.x2go.org
http://lists.x2go.org/listinfo/x2go-commits

Reply via email to