]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/tls.c
Remove SQLite2 scripts
[bacula/bacula] / bacula / src / lib / tls.c
index ecfed33399f10927163ded56d1041f2f66d14ae3..62a1ecf1082a21d5759a29238eb3d52f1fdf7665 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2005-2007 Free Software Foundation Europe e.V.
+   Copyright (C) 2005-2008 Free Software Foundation Europe e.V.
 
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
@@ -20,7 +20,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   Bacula® is a registered trademark of John Walker.
+   Bacula® is a registered trademark of Kern Sibbald.
    The licensor of Bacula is the Free Software Foundation Europe
    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
    Switzerland, email:ftf@fsfeurope.org.
@@ -51,7 +51,6 @@
 #include "bacula.h"
 #include <assert.h>
 
-extern time_t watchdog_time;
 
 #ifdef HAVE_TLS /* Is TLS enabled? */
 
@@ -559,15 +558,22 @@ void tls_bsock_shutdown(BSOCK *bsock)
     */
    int err;
 
+   btimer_t *tid;
+
    /* Set socket blocking for shutdown */
    bsock->set_blocking();
 
+   tid = start_bsock_timer(bsock, 60 * 2);
    err = SSL_shutdown(bsock->tls->openssl);
+   stop_bsock_timer(tid);
    if (err == 0) {
       /* Complete shutdown */
+      tid = start_bsock_timer(bsock, 60 * 2);
       err = SSL_shutdown(bsock->tls->openssl);
+      stop_bsock_timer(tid);
    }
 
+
    switch (SSL_get_error(bsock->tls->openssl, err)) {
    case SSL_ERROR_NONE:
       break;