summaryrefslogtreecommitdiff
path: root/recipes/qtnx/files/ssh_dnserror.patch
blob: b4072c7aca270b276ef46daacbdfb8e457406630 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Index: qtnx-0.9/qtnxwindow.cpp
===================================================================
--- qtnx-0.9.orig/qtnxwindow.cpp	2008-11-05 18:53:29.000000000 +0100
+++ qtnx-0.9/qtnxwindow.cpp	2008-11-05 18:54:39.000000000 +0100
@@ -271,6 +271,15 @@
     reinitialiseClient();
 }
 
+void QtNXWindow::dnsFailed()
+{
+    QMessageBox::critical(this, tr("DNS Lookup Failure"),
+            tr("Are you really connected to the network?"), QMessageBox::Ok, QMessageBox::NoButton,
+            QMessageBox::NoButton);
+
+    reinitialiseClient();
+}
+
 void QtNXWindow::handleAtCapacity()
 {
     QMessageBox::critical(this, tr("Server at capacity"),
@@ -381,6 +390,7 @@
     publicKey = binaryPath + "/id.key";
 #endif
 
+    cout << "invoke backend" << endl;
     m_NXClient->invokeNXSSH(publicKey, config.serverHost, config.encryption, "",
             config.serverPort);
 
@@ -602,6 +612,10 @@
         case NXCL_PROCESS_ERROR:
 	    handleStatus(tr("An error occurred running a helper program"));
             break;
+	 case NXCL_DNS_ERROR:
+	    handleStatus(tr("DNS error occurred"));
+	    dnsFailed();
+	    break;
         default:
             break;
     }
Index: qtnx-0.9/qtnxwindow.h
===================================================================
--- qtnx-0.9.orig/qtnxwindow.h	2008-11-05 18:53:29.000000000 +0100
+++ qtnx-0.9/qtnxwindow.h	2008-11-05 18:53:29.000000000 +0100
@@ -122,6 +122,7 @@
         void resumeResumePressed(QString);
         void sshContinue(QString);
         void failedLogin();
+	void dnsFailed();
         void showLogWindow();
         void quit();
     private: