]> git.sur5r.net Git - bacula/bacula/commitdiff
There's no reason to check for exceptional conditions in the select() loop.
authorLandon Fuller <landonf@opendarwin.org>
Mon, 10 Sep 2007 21:11:31 +0000 (21:11 +0000)
committerLandon Fuller <landonf@opendarwin.org>
Mon, 10 Sep 2007 21:11:31 +0000 (21:11 +0000)
This may fix bug #944, but there shouldn't be any OOB data on these sockets.

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5519 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/lib/tls.c

index 26d8df332e98c7724290aa8ce1553134fa72d5e6..ae05e588b6789e1ac4bbc6d52ec88ceb20e437b9 100644 (file)
@@ -488,7 +488,7 @@ static inline bool openssl_bsock_session_start(BSOCK *bsock, bool server)
          tv.tv_sec = 10;
          tv.tv_usec = 0;
          /* Block until we can read */
-         select(fdmax, &fdset, NULL, &fdset, &tv);
+         select(fdmax, &fdset, NULL, NULL, &tv);
          break;
       case SSL_ERROR_WANT_WRITE:
          /* If we timeout of a select, this will be unset */
@@ -497,7 +497,7 @@ static inline bool openssl_bsock_session_start(BSOCK *bsock, bool server)
          tv.tv_sec = 10;
          tv.tv_usec = 0;
          /* Block until we can write */
-         select(fdmax, NULL, &fdset, &fdset, &tv);
+         select(fdmax, NULL, &fdset, NULL, &tv);
          break;
       default:
          /* Socket Error Occured */
@@ -628,7 +628,7 @@ static inline int openssl_bsock_readwrite(BSOCK *bsock, char *ptr, int nbytes, b
          tv.tv_sec = 10;
          tv.tv_usec = 0;
          /* Block until we can read or write */
-         select(fdmax, NULL, &fdset, &fdset, &tv);
+         select(fdmax, NULL, &fdset, NULL, &tv);
          break;
 
       case SSL_ERROR_ZERO_RETURN: