summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sshkeys/sshkeys.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/noncore/settings/sshkeys/sshkeys.cpp b/noncore/settings/sshkeys/sshkeys.cpp
index 701356a..3b4dce6 100644
--- a/noncore/settings/sshkeys/sshkeys.cpp
+++ b/noncore/settings/sshkeys/sshkeys.cpp
@@ -71,25 +71,28 @@ void SSHKeysApp::doRefreshListButton()
keystate = KeySize;
incoming_keyname="";
incoming_keysize="";
incoming_keyfingerprint="";
// log_text("Running ssh-add -l");
sshadd_process << "ssh-add" << "-l";
bool ret = sshadd_process.start(OProcess::Block, OProcess::AllOutput);
if (!ret) {
log_text(tr("Error running ssh-add"));
return;
}
-
+ if (sshadd_process.exitStatus() == 2) {
+ log_text(tr("Connection to ssh-agent failed"));
+ setEnabled(FALSE);
+ }
}
void SSHKeysApp::get_list_keys_output(OProcess *proc, char *buffer, int buflen)
{
int i;
(void) proc;
for (i=0; i<buflen; i++) {
switch(keystate) {
case Noise:
noise:
if (buffer[i] == '\n') {