summaryrefslogtreecommitdiff
authordwmw2 <dwmw2>2002-09-21 08:42:42 (UTC)
committer dwmw2 <dwmw2>2002-09-21 08:42:42 (UTC)
commit51f94f502b2b9a92d562a3ad726ad58372860c5e (patch) (unidiff)
tree3f587669a6fd91b36a68a37d1c2d3182d92eaab8
parent0bb8b359d20f7d5ead88c260c5560ab7b60358b9 (diff)
downloadopie-51f94f502b2b9a92d562a3ad726ad58372860c5e.zip
opie-51f94f502b2b9a92d562a3ad726ad58372860c5e.tar.gz
opie-51f94f502b2b9a92d562a3ad726ad58372860c5e.tar.bz2
display stderr from ssh-add process too.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sshkeys/sshkeys.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/noncore/settings/sshkeys/sshkeys.cpp b/noncore/settings/sshkeys/sshkeys.cpp
index 88acf94..c5e1170 100644
--- a/noncore/settings/sshkeys/sshkeys.cpp
+++ b/noncore/settings/sshkeys/sshkeys.cpp
@@ -48,6 +48,8 @@ SSHKeysApp::SSHKeysApp( QWidget* parent, const char* name, WFlags fl )
48 48
49 connect(&addprocess, SIGNAL(receivedStdout(OProcess*,char*,int)), 49 connect(&addprocess, SIGNAL(receivedStdout(OProcess*,char*,int)),
50 this, SLOT(log_sshadd_output(OProcess*,char*,int))); 50 this, SLOT(log_sshadd_output(OProcess*,char*,int)));
51 connect(&addprocess, SIGNAL(receivedStderr(OProcess*,char*,int)),
52 this, SLOT(log_sshadd_output(OProcess*,char*,int)));
51 connect(&addprocess, SIGNAL(processExited(OProcess*)), 53 connect(&addprocess, SIGNAL(processExited(OProcess*)),
52 this, SLOT(ssh_add_exited(OProcess*))); 54 this, SLOT(ssh_add_exited(OProcess*)));
53 55
@@ -87,6 +89,8 @@ void SSHKeysApp::doRefreshListButton()
87 89
88 connect(&sshadd_process, SIGNAL(receivedStdout(OProcess*,char*,int)), 90 connect(&sshadd_process, SIGNAL(receivedStdout(OProcess*,char*,int)),
89 this, SLOT(get_list_keys_output(OProcess*,char*,int))); 91 this, SLOT(get_list_keys_output(OProcess*,char*,int)));
92 connect(&sshadd_process, SIGNAL(receivedStderr(OProcess*,char*,int)),
93 this, SLOT(log_sshadd_output(OProcess*,char*,int)));
90 94
91 keystate = KeySize; 95 keystate = KeySize;
92 incoming_keyname=""; 96 incoming_keyname="";
@@ -101,7 +105,6 @@ void SSHKeysApp::doRefreshListButton()
101 return; 105 return;
102 } 106 }
103 if (sshadd_process.exitStatus() == 2) { 107 if (sshadd_process.exitStatus() == 2) {
104 log_text(tr("Connection to ssh-agent failed"));
105 setEnabled(FALSE); 108 setEnabled(FALSE);
106 } 109 }
107} 110}
@@ -188,9 +191,8 @@ void SSHKeysApp::ssh_add_exited(OProcess *proc)
188 191
189 doRefreshListButton(); 192 doRefreshListButton();
190 setEnabled(TRUE); 193 setEnabled(TRUE);
191 if (proc->exitStatus()) { 194 if (proc->exitStatus() == 2) {
192 195 setEnabled(FALSE);
193 log_text(QString(tr("ssh-add failed")));
194 } 196 }
195} 197}
196 198
@@ -239,6 +241,8 @@ void SSHKeysApp::doRemoveAllButton()
239 241
240 connect(&sshadd_process, SIGNAL(receivedStdout(OProcess*,char*,int)), 242 connect(&sshadd_process, SIGNAL(receivedStdout(OProcess*,char*,int)),
241 this, SLOT(log_sshadd_output(OProcess*,char*,int))); 243 this, SLOT(log_sshadd_output(OProcess*,char*,int)));
244 connect(&sshadd_process, SIGNAL(receivedStderr(OProcess*,char*,int)),
245 this, SLOT(log_sshadd_output(OProcess*,char*,int)));
242 246
243 log_text(tr("Running ssh-add -D")); 247 log_text(tr("Running ssh-add -D"));
244 sshadd_process << "ssh-add" << "-D"; 248 sshadd_process << "ssh-add" << "-D";