]> git.sur5r.net Git - openldap/commitdiff
ITS#4937, consolidate statslog
authorHoward Chu <hyc@openldap.org>
Mon, 23 Jul 2007 00:47:31 +0000 (00:47 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 23 Jul 2007 00:47:31 +0000 (00:47 +0000)
servers/slapd/compare.c

index 3683087a298dc7c5ac4cb7ab5e54c5f576d9a048..da26178315eb25ab61d7138c9204c314ec48c094 100644 (file)
@@ -139,17 +139,17 @@ fe_op_compare( Operation *op, SlapReply *rs )
        AttributeAssertion      ava = *op->orc_ava;
        BackendDB               *bd = op->o_bd;
 
-       if( strcasecmp( op->o_req_ndn.bv_val, LDAP_ROOT_DSE ) == 0 ) {
-               Debug( LDAP_DEBUG_ARGS,
-                       "do_compare: dn (%s) attr (%s) value (%s)\n",
-                       op->o_req_dn.bv_val,
-                       ava.aa_desc->ad_cname.bv_val, ava.aa_value.bv_val );
+       Debug( LDAP_DEBUG_ARGS,
+               "do_compare: dn (%s) attr (%s) value (%s)\n",
+               op->o_req_dn.bv_val,
+               ava.aa_desc->ad_cname.bv_val, ava.aa_value.bv_val );
 
-               Statslog( LDAP_DEBUG_STATS,
-                       "%s CMP dn=\"%s\" attr=\"%s\"\n",
-                       op->o_log_prefix, op->o_req_dn.bv_val,
-                       ava.aa_desc->ad_cname.bv_val, 0, 0 );
+       Statslog( LDAP_DEBUG_STATS,
+               "%s CMP dn=\"%s\" attr=\"%s\"\n",
+               op->o_log_prefix, op->o_req_dn.bv_val,
+               ava.aa_desc->ad_cname.bv_val, 0, 0 );
 
+       if( strcasecmp( op->o_req_ndn.bv_val, LDAP_ROOT_DSE ) == 0 ) {
                if( backend_check_restrictions( op, rs, NULL ) != LDAP_SUCCESS ) {
                        send_ldap_result( op, rs );
                        goto cleanup;
@@ -162,15 +162,6 @@ fe_op_compare( Operation *op, SlapReply *rs )
                }
 
        } else if ( bvmatch( &op->o_req_ndn, &frontendDB->be_schemandn ) ) {
-               Debug( LDAP_DEBUG_ARGS, "do_compare: dn (%s) attr (%s) value (%s)\n",
-                       op->o_req_dn.bv_val,
-                       ava.aa_desc->ad_cname.bv_val, ava.aa_value.bv_val );
-
-               Statslog( LDAP_DEBUG_STATS,
-                       "%s CMP dn=\"%s\" attr=\"%s\"\n",
-                       op->o_log_prefix, op->o_req_dn.bv_val,
-                       ava.aa_desc->ad_cname.bv_val, 0, 0 );
-
                if( backend_check_restrictions( op, rs, NULL ) != LDAP_SUCCESS ) {
                        send_ldap_result( op, rs );
                        rs->sr_err = 0;
@@ -231,14 +222,6 @@ fe_op_compare( Operation *op, SlapReply *rs )
                goto cleanup;
        }
 
-       Debug( LDAP_DEBUG_ARGS, "do_compare: dn (%s) attr (%s) value (%s)\n",
-           op->o_req_dn.bv_val,
-               ava.aa_desc->ad_cname.bv_val, ava.aa_value.bv_val );
-
-       Statslog( LDAP_DEBUG_STATS, "%s CMP dn=\"%s\" attr=\"%s\"\n",
-               op->o_log_prefix, op->o_req_dn.bv_val,
-               ava.aa_desc->ad_cname.bv_val, 0, 0 );
-
        op->orc_ava = &ava;
 
        if ( SLAP_SHADOW(op->o_bd) && get_dontUseCopy(op) ) {