Only read from agent if agent enabled.
This commit is contained in:
parent
9aed54d33a
commit
497996c48e
@ -474,6 +474,7 @@ void* ssh_client_thread(void* data) {
|
|||||||
total_read += bytes_read;
|
total_read += bytes_read;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ENABLE_SSH_AGENT
|
||||||
/* If agent open, handle any agent packets */
|
/* If agent open, handle any agent packets */
|
||||||
if (client_data->auth_agent != NULL) {
|
if (client_data->auth_agent != NULL) {
|
||||||
bytes_read = ssh_auth_agent_read(client_data->auth_agent);
|
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)
|
else if (bytes_read < 0 && bytes_read != LIBSSH2_ERROR_EAGAIN)
|
||||||
client_data->auth_agent = NULL;
|
client_data->auth_agent = NULL;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Wait for more data if reads turn up empty */
|
/* Wait for more data if reads turn up empty */
|
||||||
if (total_read == 0) {
|
if (total_read == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user