diff cli-agentfwd.c @ 563:12fc5b342dc0

- Don't print warning if SSH_AUTH_SOCK is unset
author Matt Johnston <matt@ucc.asn.au>
date Thu, 13 Aug 2009 14:57:27 +0000
parents a900cb1c53fa
children 3c5f631358a0
line wrap: on
line diff
--- a/cli-agentfwd.c	Fri Jul 31 15:51:33 2009 +0000
+++ b/cli-agentfwd.c	Thu Aug 13 14:57:27 2009 +0000
@@ -66,6 +66,10 @@
 
 	fd = connect_unix(agent_sock);
 
+	if (fd < 0) {
+		dropbear_log(LOG_INFO, "Failed to connect to agent");
+	}
+
 	return fd;
 }
 
@@ -80,7 +84,6 @@
 
 	fd = connect_agent();
 	if (cli_opts.agent_fd < 0) {
-		dropbear_log(LOG_INFO, "Failed to connect to agent");
 		return SSH_OPEN_CONNECT_FAILED;
 	}
 
@@ -247,7 +250,6 @@
 	/* agent_fd will be closed after successful auth */
 	cli_opts.agent_fd = connect_agent();
 	if (cli_opts.agent_fd < 0) {
-		dropbear_log(LOG_INFO, "Failed to connect to agent");
 		return;
 	}