From 497996c48ec77290c11d90a2b5298fbfb8032ecf Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Tue, 3 Dec 2013 09:21:47 -0800 Subject: [PATCH] Only read from agent if agent enabled. --- src/protocols/ssh/ssh_client.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/protocols/ssh/ssh_client.c b/src/protocols/ssh/ssh_client.c index ef730b44..cb6a6364 100644 --- a/src/protocols/ssh/ssh_client.c +++ b/src/protocols/ssh/ssh_client.c @@ -474,6 +474,7 @@ void* ssh_client_thread(void* data) { total_read += bytes_read; } +#ifdef ENABLE_SSH_AGENT /* If agent open, handle any agent packets */ if (client_data->auth_agent != NULL) { bytes_read = ssh_auth_agent_read(client_data->auth_agent); @@ -482,6 +483,7 @@ void* ssh_client_thread(void* data) { else if (bytes_read < 0 && bytes_read != LIBSSH2_ERROR_EAGAIN) client_data->auth_agent = NULL; } +#endif /* Wait for more data if reads turn up empty */ if (total_read == 0) {