]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#8731 General Debug() related fixes
authorOndřej Kuzník <okuznik@symas.com>
Mon, 11 Sep 2017 13:26:45 +0000 (13:26 +0000)
committerOndřej Kuzník <ondra@openldap.org>
Fri, 15 Feb 2019 16:51:53 +0000 (16:51 +0000)
14 files changed:
contrib/slapd-modules/nssov/nssov.c
contrib/slapd-modules/smbk5pwd/smbk5pwd.c
libraries/librewrite/config.c
servers/slapd/back-asyncmeta/config.c
servers/slapd/back-asyncmeta/message_queue.c
servers/slapd/back-bdb/init.c
servers/slapd/back-mdb/init.c
servers/slapd/back-meta/config.c
servers/slapd/back-sock/extended.c
servers/slapd/back-wt/dn2entry.c
servers/slapd/back-wt/id2entry.c
servers/slapd/back-wt/init.c
servers/slapd/back-wt/tools.c
servers/slapd/controls.c

index abe9b4a1b4c3b14977828ebb119f04f0f1942be2..b5221c1af1145eb4b09f656c3833d8bc9c69bfc1 100644 (file)
@@ -947,7 +947,7 @@ nssov_db_close(
 
        if ( slapMode & SLAP_SERVER_MODE ) {
                /* close socket if it's still in use */
-               if (ni->ni_socket >= 0);
+               if (ni->ni_socket >= 0)
                {
                        if (close(ni->ni_socket))
                                Debug( LDAP_DEBUG_ANY,"problem closing server socket (ignored): %s",strerror(errno),0,0);
index 3f48788360eb690b3ab737dc18b2dd0b83cbeb9c..96d44ec8cce194660831932ce3dd1bbd4ab33eef 100644 (file)
@@ -837,7 +837,7 @@ smbk5pwd_cf_func( ConfigArgs *c )
                if ( c->value_int < 0 ) {
                        Debug( LDAP_DEBUG_ANY, "%s: smbk5pwd: "
                                "<%s> invalid negative value \"%d\".",
-                               c->log, c->argv[ 0 ], 0 );
+                               c->log, c->argv[ 0 ], c->value_int );
                        return 1;
                }
                pi->smb_must_change = c->value_int;
@@ -855,7 +855,7 @@ smbk5pwd_cf_func( ConfigArgs *c )
                 if ( c->value_int < 0 ) {
                         Debug( LDAP_DEBUG_ANY, "%s: smbk5pwd: "
                                 "<%s> invalid negative value \"%d\".",
-                                c->log, c->argv[ 0 ], 0 );
+                                c->log, c->argv[ 0 ], c->value_int );
                         return 1;
                 }
                 pi->smb_can_change = c->value_int;
index 58953041f43a4ac31ef2189ba0e813b56d2ffad8..f868540da733dd4df874f3b25e16f69f4964621d 100644 (file)
@@ -288,7 +288,7 @@ rewrite_parse(
        } else {
                Debug( LDAP_DEBUG_ANY,
                                "[%s:%d] unknown command '%s'\n",
-                               fname, lineno, "" );
+                               fname, lineno, argv[ 0 ] );
                return -1;
        }
 
index f5f6beba2ad9e00eb763ec6cea1601bb356c0f7f..2753b5417fca24854fbecba719427fdcfbd5a036 100644 (file)
@@ -2949,7 +2949,7 @@ asyncmeta_map_config(
                if ( src[ 0 ] != '\0' ) {
                        if ( oc_bvfind( &mapping[ 0 ].src ) == NULL ) {
                                Debug( LDAP_DEBUG_ANY,
-       "warning, source objectClass '%s' should be defined in schema\n",
+       "%s: warning, source objectClass '%s' should be defined in schema\n",
                                        c->log, src, 0 );
 
                                /*
@@ -2961,7 +2961,7 @@ asyncmeta_map_config(
 
                if ( oc_bvfind( &mapping[ 0 ].dst ) == NULL ) {
                        Debug( LDAP_DEBUG_ANY,
-       "warning, destination objectClass '%s' is not defined in schema\n",
+       "%s: warning, destination objectClass '%s' is not defined in schema\n",
                                c->log, dst, 0 );
                }
        } else {
@@ -2973,7 +2973,7 @@ asyncmeta_map_config(
                        rc = slap_bv2ad( &mapping[ 0 ].src, &ad, &text );
                        if ( rc != LDAP_SUCCESS ) {
                                Debug( LDAP_DEBUG_ANY,
-       "warning, source attributeType '%s' should be defined in schema\n",
+       "%s: warning, source attributeType '%s' should be defined in schema\n",
                                        c->log, src, 0 );
 
                                /*
@@ -3001,7 +3001,7 @@ asyncmeta_map_config(
                rc = slap_bv2ad( &mapping[ 0 ].dst, &ad, &text );
                if ( rc != LDAP_SUCCESS ) {
                        Debug( LDAP_DEBUG_ANY,
-       "warning, destination attributeType '%s' is not defined in schema\n",
+       "%s: warning, destination attributeType '%s' is not defined in schema\n",
                                c->log, dst, 0 );
 
                        /*
index ddc6d6d03e586817a1ffc0d2a5079c732dedc048..258482536398a24246439867a6866557edba84cc 100644 (file)
@@ -470,8 +470,7 @@ void asyncmeta_clear_bm_context(bm_context_t *bc)
                }
                break;
        default:
-               Debug( LDAP_DEBUG_TRACE, "==> asyncmeta_clear_bm_context: other message type",
-              0, 0, 0 );
+               Debug( LDAP_DEBUG_TRACE, "==> asyncmeta_clear_bm_context: other message type" );
        }
        if (bmc->dc != NULL) {
                free (bmc->dc);
@@ -480,8 +479,7 @@ void asyncmeta_clear_bm_context(bm_context_t *bc)
 
        if (clear_cl > 0) {
                asyncmeta_free_candidate_list(cl, lock);
-               Debug( LDAP_DEBUG_TRACE, "==> asyncmeta_clear_bm_context: free_cl_list\n",
-              0, 0, 0 );
+               Debug( LDAP_DEBUG_TRACE, "==> asyncmeta_clear_bm_context: free_cl_list\n" );
        }
 #else
        asyncmeta_memctx_put(op->o_threadctx, op->o_tmpmemctx);
index a300be306c15cfd028c77536a2d1270fa02cae15..3a33e738c1c43ab599a854d91beca47b3ee7a0df 100644 (file)
@@ -116,7 +116,7 @@ bdb_db_open( BackendDB *be, ConfigReply *cr )
        if ( be->be_suffix == NULL ) {
                Debug( LDAP_DEBUG_ANY,
                        LDAP_XSTRING(bdb_db_open) ": need suffix.\n",
-                       1, 0, 0 );
+                       0, 0, 0 );
                return -1;
        }
 
index 3560f1b91131630dfd8ec08142476b29424bad26..af503f622febc4a5b5ba96f2aaf33902cc91beb7 100644 (file)
@@ -95,7 +95,7 @@ mdb_db_open( BackendDB *be, ConfigReply *cr )
        if ( be->be_suffix == NULL ) {
                Debug( LDAP_DEBUG_ANY,
                        LDAP_XSTRING(mdb_db_open) ": need suffix.\n",
-                       1, 0, 0 );
+                       0, 0, 0 );
                return -1;
        }
 
index 7c4659e27a7f736682a09a0c3be67d976a58efa3..e1d63f9d61842569f9dec57c7a9ebf79085f0eb8 100644 (file)
@@ -3139,7 +3139,7 @@ ldap_back_map_config(
                if ( src[ 0 ] != '\0' ) {
                        if ( oc_bvfind( &mapping[ 0 ].src ) == NULL ) {
                                Debug( LDAP_DEBUG_ANY,
-       "warning, source objectClass '%s' should be defined in schema\n",
+       "%s: warning, source objectClass '%s' should be defined in schema\n",
                                        c->log, src, 0 );
 
                                /*
@@ -3151,7 +3151,7 @@ ldap_back_map_config(
 
                if ( oc_bvfind( &mapping[ 0 ].dst ) == NULL ) {
                        Debug( LDAP_DEBUG_ANY,
-       "warning, destination objectClass '%s' is not defined in schema\n",
+       "%s: warning, destination objectClass '%s' is not defined in schema\n",
                                c->log, dst, 0 );
                }
        } else {
@@ -3163,7 +3163,7 @@ ldap_back_map_config(
                        rc = slap_bv2ad( &mapping[ 0 ].src, &ad, &text );
                        if ( rc != LDAP_SUCCESS ) {
                                Debug( LDAP_DEBUG_ANY,
-       "warning, source attributeType '%s' should be defined in schema\n",
+       "%s: warning, source attributeType '%s' should be defined in schema\n",
                                        c->log, src, 0 );
 
                                /*
@@ -3191,7 +3191,7 @@ ldap_back_map_config(
                rc = slap_bv2ad( &mapping[ 0 ].dst, &ad, &text );
                if ( rc != LDAP_SUCCESS ) {
                        Debug( LDAP_DEBUG_ANY,
-       "warning, destination attributeType '%s' is not defined in schema\n",
+       "%s: warning, destination attributeType '%s' is not defined in schema\n",
                                c->log, dst, 0 );
 
                        /*
index b8a61629f411ed3e4d07ffcc3abba43f5dc9eab6..63d82fad2951096caa6d2fa54e4e53f5ee001b5d 100644 (file)
@@ -32,7 +32,7 @@ sock_back_extended( Operation *op, SlapReply *rs )
        FILE            *fp;
        struct berval b64;
 
-       Debug( LDAP_DEBUG_ARGS, "==> sock_back_extended(%s)\n",
+       Debug( LDAP_DEBUG_ARGS, "==> sock_back_extended(%s, %s)\n",
                op->ore_reqoid.bv_val, op->o_req_dn.bv_val, 0 );
 
        if ( (fp = opensock( si->si_sockpath )) == NULL ) {
index 30d6b28c3fc6873cd37c81dc58e9721d6f83e1f2..48dcfb23455800eba85c23b6ca6382ff7047b0d1 100644 (file)
@@ -87,7 +87,7 @@ int wt_dn2entry( BackendDB *be,
        if ( rc ) {
                Debug( LDAP_DEBUG_ANY,
                           LDAP_XSTRING(wt_dn2entry)
-                          ": entry decode error: %s (%d)\n",
+                          ": entry decode error: %d\n",
                           rc, 0, 0 );
                goto done;
        }
index b9241deb3bc61441fd829b5df16320ac71866fdd..7c14a6647c5f92167645ffea01ed7197b2ba0bf3 100644 (file)
@@ -157,7 +157,7 @@ int wt_id2entry( BackendDB *be,
        if ( rc ) {
                Debug( LDAP_DEBUG_ANY,
                           LDAP_XSTRING(wt_id2entry)
-                          ": entry decode error: %s (%d)\n",
+                          ": entry decode error: %d\n",
                           rc, 0, 0 );
                goto done;
        }
index 62ee634e8f1ec542ae4e389c0323fe8735e6e6df..b55e24f2965ff4bead1fb4918b5b9c9d835e8add 100644 (file)
@@ -62,7 +62,7 @@ wt_db_open( BackendDB *be, ConfigReply *cr )
        if ( be->be_suffix == NULL ) {
                Debug( LDAP_DEBUG_ANY,
                           LDAP_XSTRING(wt_db_open) ": need suffix.\n",
-                          1, 0, 0 );
+                          0, 0, 0 );
                return -1;
        }
 
index 156a6f48736da6275cca02c9219494f9004f2b74..1c4d7dec7da27be7b2e528fede8d759b63a0a3f2 100644 (file)
@@ -58,7 +58,7 @@ wt_tool_entry_open( BackendDB *be, int mode )
     if( !wc ){
                Debug( LDAP_DEBUG_ANY,
                           LDAP_XSTRING(wt_tool_entry_open)
-                          ": wt_ctx_get failed: %s (%d)\n",
+                          ": wt_ctx_get failed\n",
                           0, 0, 0 );
                return -1;
     }
@@ -496,7 +496,7 @@ done:
                rc = wc->session->rollback_transaction(wc->session, NULL);
                Debug( LDAP_DEBUG_ANY,
                           "=> " LDAP_XSTRING(wt_tool_entry_reindex)
-                          ": rollback transaction %s\n",
+                          ": rollback transaction %s (%d)\n",
                           wiredtiger_strerror(rc), rc, 0 );
        }
 
index 58e1d817702dd2a0b67ec4c53da793b927780ea0..89f75f207973f44747f2bd217bfa758f816cb995 100644 (file)
@@ -267,7 +267,7 @@ register_supported_control2(const char *controloid,
        if ( num_known_controls >= SLAP_MAX_CIDS ) {
                Debug( LDAP_DEBUG_ANY, "Too many controls registered."
                        " Recompile slapd with SLAP_MAX_CIDS defined > %d\n",
-               SLAP_MAX_CIDS, 0, 0 );
+               num_known_controls, 0, 0 );
                return LDAP_OTHER;
        }