diff --git a/contrib/slapd-modules/nssov/nssov.c b/contrib/slapd-modules/nssov/nssov.c index abe9b4a1b4..b5221c1af1 100644 --- a/contrib/slapd-modules/nssov/nssov.c +++ b/contrib/slapd-modules/nssov/nssov.c @@ -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); diff --git a/contrib/slapd-modules/smbk5pwd/smbk5pwd.c b/contrib/slapd-modules/smbk5pwd/smbk5pwd.c index 3f48788360..96d44ec8cc 100644 --- a/contrib/slapd-modules/smbk5pwd/smbk5pwd.c +++ b/contrib/slapd-modules/smbk5pwd/smbk5pwd.c @@ -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; diff --git a/libraries/librewrite/config.c b/libraries/librewrite/config.c index 58953041f4..f868540da7 100644 --- a/libraries/librewrite/config.c +++ b/libraries/librewrite/config.c @@ -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; } diff --git a/servers/slapd/back-asyncmeta/config.c b/servers/slapd/back-asyncmeta/config.c index f5f6beba2a..2753b5417f 100644 --- a/servers/slapd/back-asyncmeta/config.c +++ b/servers/slapd/back-asyncmeta/config.c @@ -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 ); /* diff --git a/servers/slapd/back-asyncmeta/message_queue.c b/servers/slapd/back-asyncmeta/message_queue.c index ddc6d6d03e..2584825363 100644 --- a/servers/slapd/back-asyncmeta/message_queue.c +++ b/servers/slapd/back-asyncmeta/message_queue.c @@ -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); diff --git a/servers/slapd/back-bdb/init.c b/servers/slapd/back-bdb/init.c index a300be306c..3a33e738c1 100644 --- a/servers/slapd/back-bdb/init.c +++ b/servers/slapd/back-bdb/init.c @@ -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; } diff --git a/servers/slapd/back-mdb/init.c b/servers/slapd/back-mdb/init.c index 3560f1b911..af503f622f 100644 --- a/servers/slapd/back-mdb/init.c +++ b/servers/slapd/back-mdb/init.c @@ -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; } diff --git a/servers/slapd/back-meta/config.c b/servers/slapd/back-meta/config.c index 7c4659e27a..e1d63f9d61 100644 --- a/servers/slapd/back-meta/config.c +++ b/servers/slapd/back-meta/config.c @@ -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 ); /* diff --git a/servers/slapd/back-sock/extended.c b/servers/slapd/back-sock/extended.c index b8a61629f4..63d82fad29 100644 --- a/servers/slapd/back-sock/extended.c +++ b/servers/slapd/back-sock/extended.c @@ -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 ) { diff --git a/servers/slapd/back-wt/dn2entry.c b/servers/slapd/back-wt/dn2entry.c index 30d6b28c3f..48dcfb2345 100644 --- a/servers/slapd/back-wt/dn2entry.c +++ b/servers/slapd/back-wt/dn2entry.c @@ -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; } diff --git a/servers/slapd/back-wt/id2entry.c b/servers/slapd/back-wt/id2entry.c index b9241deb3b..7c14a6647c 100644 --- a/servers/slapd/back-wt/id2entry.c +++ b/servers/slapd/back-wt/id2entry.c @@ -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; } diff --git a/servers/slapd/back-wt/init.c b/servers/slapd/back-wt/init.c index 62ee634e8f..b55e24f296 100644 --- a/servers/slapd/back-wt/init.c +++ b/servers/slapd/back-wt/init.c @@ -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; } diff --git a/servers/slapd/back-wt/tools.c b/servers/slapd/back-wt/tools.c index 156a6f4873..1c4d7dec7d 100644 --- a/servers/slapd/back-wt/tools.c +++ b/servers/slapd/back-wt/tools.c @@ -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 ); } diff --git a/servers/slapd/controls.c b/servers/slapd/controls.c index 58e1d81770..89f75f2079 100644 --- a/servers/slapd/controls.c +++ b/servers/slapd/controls.c @@ -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; }