From 35c937efc2404e39b024552a2875b42178c133fe Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Wed, 2 Jul 2014 18:05:26 +0200 Subject: [PATCH] Fix compilation of bsock.c when TLS is not available --- bacula/src/lib/bsock.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/bacula/src/lib/bsock.c b/bacula/src/lib/bsock.c index 2aa9f095ed..1caba11d1c 100644 --- a/bacula/src/lib/bsock.c +++ b/bacula/src/lib/bsock.c @@ -904,6 +904,11 @@ int BSOCK::wait_data(int sec, int usec) return -1; /* error return */ default: b_errno = 0; +#ifdef HAVE_TLS + if (this->tls && !tls_bsock_probe(this)) { + continue; /* false alarm, maybe a session key negotiation in progress on the socket */ + } +#endif return 1; } } @@ -933,6 +938,15 @@ int BSOCK::wait_data_intr(int sec, int usec) return -1; /* error return */ default: b_errno = 0; +<<<<<<< HEAD +======= +#ifdef HAVE_TLS + if (this->tls && !tls_bsock_probe(this)) { + /* maybe a session key negotiation waked up the socket */ + return 0; + } +#endif +>>>>>>> 625e1f1... Fix compilation of bsock.c when TLS is not available break; } return 1; -- 2.39.5