]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix compilation of bsock.c when TLS is not available
authorEric Bollengier <eric@baculasystems.com>
Wed, 2 Jul 2014 16:05:26 +0000 (18:05 +0200)
committerKern Sibbald <kern@sibbald.com>
Sat, 12 Jul 2014 13:59:12 +0000 (15:59 +0200)
bacula/src/lib/bsock.c

index 2aa9f095ed49cb99ecbfac2dfdce5d7d7265f2c7..1caba11d1c0108fac7de736aead6e6bfc56f9cdf 100644 (file)
@@ -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;