]> git.sur5r.net Git - bacula/bacula/commitdiff
bsock tweaks
authorKern Sibbald <kern@sibbald.com>
Sat, 23 Jun 2007 10:07:20 +0000 (10:07 +0000)
committerKern Sibbald <kern@sibbald.com>
Sat, 23 Jun 2007 10:07:20 +0000 (10:07 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5067 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/lib/bsock.c
bacula/src/lib/tls.c

index 809431f40a4f5d8f6c94c25d3bcc442ac8fe8f66..34f21a04bc606e8c11bfb8c64a74731e8136f618 100644 (file)
@@ -799,7 +799,7 @@ void BSOCK::close()
             bsock->tls = NULL;
          }
          if (bsock->is_timed_out()) {
-            shutdown(bsock->m_fd, 2);   /* discard any pending I/O */
+            shutdown(bsock->m_fd, SHUT_RDWR);   /* discard any pending I/O */
          }
          socketClose(bsock->m_fd);      /* normal close */
       }
index 54a3f88b10924fd0005dbf01e188ce7a7861909f..dd3aba84383909d7d22b1a4c34f70677ebf82ad9 100644 (file)
@@ -462,7 +462,7 @@ static inline bool openssl_bsock_session_start(BSOCK *bsock, bool server)
 
    /* start timer */
    bsock->timer_start = watchdog_time;
-   bsock->set_timed_out(false);
+   bsock->clear_timed_out();
 
    for (;;) { 
       if (server) {
@@ -609,7 +609,7 @@ static inline int openssl_bsock_readwrite(BSOCK *bsock, char *ptr, int nbytes, b
 
    /* start timer */
    bsock->timer_start = watchdog_time;
-   bsock->set_timed_out(false);
+   bsock->clear_timed_out();
 
    nleft = nbytes;