- Handle failure to connect to forwarding socket

--HG--
extra : convert_revision : 0cc1ae25ba35931d6ddd9e989e875ef975616be6
This commit is contained in:
Matt Johnston 2009-07-31 15:51:33 +00:00
parent 2f1ed9a34b
commit f15feb2ac6

View File

@ -79,6 +79,10 @@ static int new_agent_chan(struct Channel * channel) {
return SSH_OPEN_ADMINISTRATIVELY_PROHIBITED;
fd = connect_agent();
if (cli_opts.agent_fd < 0) {
dropbear_log(LOG_INFO, "Failed to connect to agent");
return SSH_OPEN_CONNECT_FAILED;
}
setnonblocking(fd);