From: Kern Sibbald Date: Sat, 23 Jun 2007 10:07:20 +0000 (+0000) Subject: bsock tweaks X-Git-Tag: Release-7.0.0~6094 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=47f84451a7468b2bf3422d415926578877a3ea32;p=bacula%2Fbacula bsock tweaks git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5067 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/lib/bsock.c b/bacula/src/lib/bsock.c index 809431f40a..34f21a04bc 100644 --- a/bacula/src/lib/bsock.c +++ b/bacula/src/lib/bsock.c @@ -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 */ } diff --git a/bacula/src/lib/tls.c b/bacula/src/lib/tls.c index 54a3f88b10..dd3aba8438 100644 --- a/bacula/src/lib/tls.c +++ b/bacula/src/lib/tls.c @@ -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;