aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2016-10-26 07:10:29 +0000
committerWerner Koch <[email protected]>2016-10-26 07:10:52 +0000
commitb77f95a4a675fd20f6eeb611f4e7b519eceb4ad3 (patch)
tree2d8f20a9b483d381b808eff9eb53870d0777113e
parentcommon: Use GPG_ERR_INV_VALUE instead of GPG_ERR_EINVAL. (diff)
downloadgnupg-b77f95a4a675fd20f6eeb611f4e7b519eceb4ad3.tar.gz
gnupg-b77f95a4a675fd20f6eeb611f4e7b519eceb4ad3.zip
agent: Avoid double error message.
* agent/gpg-agent.c (map_supervised_sockets): Shorten error message. Remove unneeded diagnostic. -- get_socket_name already prints error messages and thus there is not need to print another one. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to '')
-rw-r--r--agent/gpg-agent.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
index 8e2d0129b..6f73fc7ac 100644
--- a/agent/gpg-agent.c
+++ b/agent/gpg-agent.c
@@ -717,18 +717,17 @@ map_supervised_sockets (gnupg_fd_t *r_fd,
if (!fdnames)
{
struct stat statbuf;
+
if (fd_count != 1)
log_error ("no LISTEN_FDNAMES and LISTEN_FDS (%d) != 1"
" in --supervised mode."
" (ignoring all sockets but the first one)\n",
fd_count);
if (fstat (3, &statbuf) == -1 && errno ==EBADF)
- log_fatal ("file descriptor 3 must be valid in --supervised mode (as the "
- "agent's standard socket) if LISTEN_FDNAMES is not set\n");
+ log_fatal ("file descriptor 3 must be valid in --supervised mode"
+ " if LISTEN_FDNAMES is not set\n");
*r_fd = 3;
socket_name = get_socket_name (3);
- if (!socket_name)
- log_error ("cannot learn socket name for fd 3\n");
}
else if (fd_count != nfdnames)
{