]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/openssl.c
Detect mount/junction points and ignore junctions in Windows
[bacula/bacula] / bacula / src / lib / openssl.c
index af4a46fb5821113791fc96738cfcc357ea736e3c..b8ff9978fee2930dc1d9a627e85bf9fef1bebe84 100644 (file)
@@ -1,12 +1,12 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2005-2007 Free Software Foundation Europe e.V.
+   Copyright (C) 2005-2009 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.
    This program is Free Software; you can redistribute it and/or
-   modify it under the terms of version two of the GNU General Public
+   modify it under the terms of version three of the GNU Affero General Public
    License as published by the Free Software Foundation and included
    in the file LICENSE.
 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Affero General Public License
    along with this program; if not, write to the Free Software
    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.
@@ -94,13 +94,17 @@ void openssl_post_errors(JCR *jcr, int code, const char *errstring)
  */
 static unsigned long get_openssl_thread_id(void)
 {
-   /* Comparison without use of pthread_equal() is mandated by the OpenSSL API */
+#ifdef HAVE_WIN32
+   return (unsigned long)getpid();
+#else
    /*
-    * Note that this creates problems with the new Win32 pthreads
-    *   emulation code, which defines pthread_t as a structure. For
-    *   this reason, we continue to use a very old implementation.
+    * Comparison without use of pthread_equal() is mandated by the OpenSSL API 
+    *
+    * Note: this creates problems with the new Win32 pthreads
+    *   emulation code, which defines pthread_t as a structure.
     */
    return ((unsigned long)pthread_self());
+#endif
 }
 
 /*