From 638216f66c17adaa51e35e6ddfb9ef005f4975ab Mon Sep 17 00:00:00 2001 From: Markus Koskela Date: Fri, 11 Sep 2015 16:35:29 +0300 Subject: [PATCH] Yet another fix for ssh-agents. --- uploadthread.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/uploadthread.cpp b/uploadthread.cpp index c627f6c..339194e 100644 --- a/uploadthread.cpp +++ b/uploadthread.cpp @@ -243,12 +243,13 @@ LIBSSH2_AGENT* UploadThread::trySshAgent(LIBSSH2_SESSION* session) { while (1) { rc = libssh2_agent_get_identity(agent, &identity, prev_identity); - if (rc == 1) - break; + if (rc == 1) { + emit uploadMessage("failure due reaching end of public keys"); + return shutdownAgent(agent); + } if (rc < 0) { - emit uploadMessage("failure obtaining identity from ssh-agent support"); - rc = 1; + emit uploadMessage("failure in obtaining identity from ssh-agent"); return shutdownAgent(agent); }