summaryrefslogtreecommitdiff
path: root/src/socket.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2018-10-24 13:05:58 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2018-10-24 13:05:58 +0200
commit04c0eab889a8792dfcd8e4cfbea517171f33c675 (patch)
tree6ba9de92ba3c7db2ffd6fe241434fed4e5166776 /src/socket.c
parent09d7b8cfca9c818f23adff1f710c1bbf42612637 (diff)
downloadgnutls-tmp-no-print-errors.tar.gz
gnutls-cli: do not print errors twicetmp-no-print-errors
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'src/socket.c')
-rw-r--r--src/socket.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/socket.c b/src/socket.c
index eacff01b42..f488c531e5 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -588,7 +588,8 @@ socket_open2(socket_st * hd, const char *hostname, const char *service,
continue;
}
else if (err < 0) {
- fprintf(stderr, "*** handshake has failed: %s\n", gnutls_strerror(err));
+ if (!(flags & SOCKET_FLAG_DONT_PRINT_ERRORS))
+ fprintf(stderr, "*** handshake has failed: %s\n", gnutls_strerror(err));
exit(1);
}
}