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

bacula/src/lib/bsock.c
bacula/src/lib/openssl.c

index 34f21a04bc606e8c11bfb8c64a74731e8136f618..0e7f81273894e13964380d6e4ce1edf67cd01b1e 100644 (file)
@@ -798,7 +798,7 @@ void BSOCK::close()
             free_tls_connection(bsock->tls);
             bsock->tls = NULL;
          }
-         if (bsock->is_timed_out()) {
+         if (bsock->is_timed_out() || bsock->is_terminated()) {
             shutdown(bsock->m_fd, SHUT_RDWR);   /* discard any pending I/O */
          }
          socketClose(bsock->m_fd);      /* normal close */
index 59aadf26f7d5e1c71360665ebde315cb1b0a2b7d..7f161d71d1770645e6c77ba6e88604a250c575b8 100644 (file)
@@ -83,7 +83,7 @@ void openssl_post_errors(JCR *jcr, int code, const char *errstring)
       /* Acquire the human readable string */
       ERR_error_string_n(sslerr, buf, sizeof(buf));
       Dmsg3(100, "jcr=%p %s: ERR=%s\n", jcr, errstring, buf);
-      Jmsg2(jcr, M_ERROR, 0, "%s: ERR=%s\n", errstring, buf);
+      Qmsg2(jcr, M_ERROR, 0, "%s: ERR=%s\n", errstring, buf);
    }
 }