]> git.sur5r.net Git - openldap/commitdiff
ITS#4370 always init slap_daemon mutexes
authorHoward Chu <hyc@openldap.org>
Wed, 25 Jan 2006 01:36:18 +0000 (01:36 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 25 Jan 2006 01:36:18 +0000 (01:36 +0000)
servers/slapd/daemon.c

index 85fbf5f3d8053968c63b11376df56223686871bd..01afde3584a627ca43555ba44ee399911f7e5fc9 100644 (file)
@@ -1121,6 +1121,12 @@ int slapd_daemon_init( const char *urls )
 
        Debug( LDAP_DEBUG_ARGS, "daemon_init: %s\n",
                urls ? urls : "<null>", 0, 0 );
+
+       ldap_pvt_thread_mutex_init( &slap_daemon.sd_mutex );
+#ifdef HAVE_TCPD
+       ldap_pvt_thread_mutex_init( &slap_daemon.tcpd_mutex );
+#endif
+
        if( (rc = sockinit()) != 0 ) return rc;
 
 #ifdef HAVE_SYSCONF
@@ -1190,11 +1196,6 @@ int slapd_daemon_init( const char *urls )
 #endif
 
        ldap_charray_free( u );
-       ldap_pvt_thread_mutex_init( &slap_daemon.sd_mutex );
-
-#ifdef HAVE_TCPD
-       ldap_pvt_thread_mutex_init( &slap_daemon.tcpd_mutex );
-#endif
 
        return !i;
 }