]> git.sur5r.net Git - openldap/commitdiff
control/TXN cleanup
authorKurt Zeilenga <kurt@openldap.org>
Tue, 7 Mar 2006 22:05:57 +0000 (22:05 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 7 Mar 2006 22:05:57 +0000 (22:05 +0000)
servers/slapd/back-bdb/add.c
servers/slapd/back-bdb/delete.c
servers/slapd/back-bdb/modify.c
servers/slapd/back-bdb/modrdn.c
servers/slapd/backend.c
servers/slapd/controls.c

index 3377541de7386c664ae945c1413c3a39db69e97b..3cafbe42cb2ea49abb857251ac5a92f08cf09a8c 100644 (file)
@@ -47,6 +47,7 @@ bdb_add(Operation *op, SlapReply *rs )
        Debug(LDAP_DEBUG_ARGS, "==> " LDAP_XSTRING(bdb_add) ": %s\n",
                op->oq_add.rs_e->e_name.bv_val, 0, 0);
 
+#ifdef LDAP_X_TXN
        if( op->o_txnSpec ) {
                /* acquire connection lock */
                ldap_pvt_thread_mutex_lock( &op->o_conn->c_mutex );
@@ -76,6 +77,7 @@ txnReturn:
                send_ldap_result( op, rs );
                return rs->sr_err;
        }
+#endif
 
        ctrls[num_ctrls] = 0;
 
index 7ecf66e03af1865ae09432dfaad55106756ea0aa..60fa54f9a18f2f58c9a65abc265a7249463494ff 100644 (file)
@@ -55,6 +55,7 @@ bdb_delete( Operation *op, SlapReply *rs )
        Debug( LDAP_DEBUG_ARGS, "==> " LDAP_XSTRING(bdb_delete) ": %s\n",
                op->o_req_dn.bv_val, 0, 0 );
 
+#ifdef LDAP_X_TXN
        if( op->o_txnSpec ) {
                /* acquire connection lock */
                ldap_pvt_thread_mutex_lock( &op->o_conn->c_mutex );
@@ -84,6 +85,7 @@ txnReturn:
                send_ldap_result( op, rs );
                return rs->sr_err;
        }
+#endif
 
        ctrls[num_ctrls] = 0;
 
index 60697881a8f57179850844e4adc585b3f844dcd7..7ad798b480182c77970395a904596c2dcd777880 100644 (file)
@@ -296,6 +296,7 @@ bdb_modify( Operation *op, SlapReply *rs )
        Debug( LDAP_DEBUG_ARGS, LDAP_XSTRING(bdb_modify) ": %s\n",
                op->o_req_dn.bv_val, 0, 0 );
 
+#ifdef LDAP_X_TXN
        if( op->o_txnSpec ) {
                /* acquire connection lock */
                ldap_pvt_thread_mutex_lock( &op->o_conn->c_mutex );
@@ -325,6 +326,7 @@ txnReturn:
                send_ldap_result( op, rs );
                return rs->sr_err;
        }
+#endif
 
        ctrls[num_ctrls] = NULL;
 
index 23b42a19e62f598baa8472fc60ebe734eb2a9584..23d28810af3d4262c9c234a5a1bcab458ef72d71 100644 (file)
@@ -65,6 +65,7 @@ bdb_modrdn( Operation *op, SlapReply *rs )
                op->o_req_dn.bv_val,op->oq_modrdn.rs_newrdn.bv_val,
                op->oq_modrdn.rs_newSup ? op->oq_modrdn.rs_newSup->bv_val : "NULL" );
 
+#ifdef LDAP_X_TXN
        if( op->o_txnSpec ) {
                /* acquire connection lock */
                ldap_pvt_thread_mutex_lock( &op->o_conn->c_mutex );
@@ -94,6 +95,7 @@ txnReturn:
                send_ldap_result( op, rs );
                return rs->sr_err;
        }
+#endif
 
        ctrls[num_ctrls] = NULL;
 
index 3256dd05f09e106feb7d0f70fb1bfcec29881ddb..eeb2b5dd9a3f72e313b998456b0ad4dd2cf0e1d9 100644 (file)
@@ -818,10 +818,14 @@ backend_check_controls(
                                /* unrecognized control */ 
                                if ( (*ctrls)->ldctl_iscritical ) {
                                        /* should not be reachable */ 
-                                       Debug( LDAP_DEBUG_ANY,
-                                               "backend_check_controls: unrecognized control: %s\n",
+                                       Debug( LDAP_DEBUG_ANY, "backend_check_controls: "
+                                               "unrecognized critical control: %s\n",
                                                (*ctrls)->ldctl_oid, 0, 0 );
                                        assert( 0 );
+                               } else {
+                                       Debug( LDAP_DEBUG_TRACE, "backend_check_controls: "
+                                               "unrecognized non-critical control: %s\n",
+                                               (*ctrls)->ldctl_oid, 0, 0 );
                                }
                                break;
 
index 5d9d73f4123a509b18a9a05c52ed01f33c8f3b79..4592ee2aae20b0e304bb37e99083748669bc05b3 100644 (file)
@@ -492,9 +492,11 @@ slap_global_control( Operation *op, const char *oid, int *cid )
                return LDAP_COMPARE_TRUE;
        }
 
+#if 0
        Debug( LDAP_DEBUG_TRACE,
                "slap_global_control: unavailable control: %s\n",      
                oid, 0, 0 );
+#endif
 
        return LDAP_COMPARE_FALSE;
 }