]> git.sur5r.net Git - openldap/commitdiff
Add some addl. logging
authorKurt Zeilenga <kurt@openldap.org>
Thu, 2 Aug 2001 03:37:20 +0000 (03:37 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Thu, 2 Aug 2001 03:37:20 +0000 (03:37 +0000)
servers/slapd/main.c

index ebf130a0be1e142397c4dfa58a99a6a57522b3b1..8801d79c59c64effac91d586c6ca42fe3031f27a 100644 (file)
@@ -399,8 +399,30 @@ int main( int argc, char **argv )
 
 #ifdef HAVE_TLS
        rc = ldap_pvt_tls_init();
+       if( rc != 0) {
+#ifdef NEW_LOGGING
+               LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+                          "main: tls init failed: %d\n", rc ));
+#else
+               Debug( LDAP_DEBUG_ANY,
+                   "main: TLS init failed: %d\n",
+                   0, 0, 0 );
+#endif
+               rc = 1;
+               SERVICE_EXIT( ERROR_SERVICE_SPECIFIC_ERROR, 20 );
+               goto destroy;
+       }
 
-       if (rc || ldap_pvt_tls_init_def_ctx() != 0) {
+       rc = ldap_pvt_tls_init_def_ctx();
+       if( rc != 0) {
+#ifdef NEW_LOGGING
+               LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+                          "main: tls init def ctx failed: %d\n", rc ));
+#else
+               Debug( LDAP_DEBUG_ANY,
+                   "main: TLS init def ctx failed: %d\n",
+                   0, 0, 0 );
+#endif
                rc = 1;
                SERVICE_EXIT( ERROR_SERVICE_SPECIFIC_ERROR, 20 );
                goto destroy;