comparison cli-agentfwd.c @ 562:a900cb1c53fa

- Handle failure to connect to forwarding socket
author Matt Johnston <matt@ucc.asn.au>
date Fri, 31 Jul 2009 15:51:33 +0000
parents 52d7301e46bd
children 12fc5b342dc0
comparison
equal deleted inserted replaced
561:541ebf5bf0f6 562:a900cb1c53fa
77 77
78 if (!cli_opts.agent_fwd) 78 if (!cli_opts.agent_fwd)
79 return SSH_OPEN_ADMINISTRATIVELY_PROHIBITED; 79 return SSH_OPEN_ADMINISTRATIVELY_PROHIBITED;
80 80
81 fd = connect_agent(); 81 fd = connect_agent();
82 if (cli_opts.agent_fd < 0) {
83 dropbear_log(LOG_INFO, "Failed to connect to agent");
84 return SSH_OPEN_CONNECT_FAILED;
85 }
82 86
83 setnonblocking(fd); 87 setnonblocking(fd);
84 88
85 ses.maxfd = MAX(ses.maxfd, fd); 89 ses.maxfd = MAX(ses.maxfd, fd);
86 90