]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-bdb/modrdn.c
Cleanup prev commit
[openldap] / servers / slapd / back-bdb / modrdn.c
index 6aececa31ef7629efc7df70c16b199213875c43f..1497a19822f5ac2c82003eea9f37171ce3635837 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2000-2006 The OpenLDAP Foundation.
+ * Copyright 2000-2007 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -578,8 +578,12 @@ retry:     /* transaction retry */
                {
                        Debug( LDAP_DEBUG_TRACE,        
                                "<=- " LDAP_XSTRING(bdb_modrdn)
-                               ": post-read failed!\n", 0, 0, 0 );
-                       goto return_results;
+                               ": pre-read failed!\n", 0, 0, 0 );
+                       if ( op->o_preread & SLAP_CONTROL_CRITICAL ) {
+                               /* FIXME: is it correct to abort
+                                * operation if control fails? */
+                               goto return_results;
+                       }
                }                   
        }
 
@@ -717,7 +721,11 @@ retry:     /* transaction retry */
                        Debug( LDAP_DEBUG_TRACE,        
                                "<=- " LDAP_XSTRING(bdb_modrdn)
                                ": post-read failed!\n", 0, 0, 0 );
-                       goto return_results;
+                       if ( op->o_postread & SLAP_CONTROL_CRITICAL ) {
+                               /* FIXME: is it correct to abort
+                                * operation if control fails? */
+                               goto return_results;
+                       }
                }                   
        }
 
@@ -775,7 +783,7 @@ return_results:
        }
        send_ldap_result( op, rs );
 
-       if( rs->sr_err == LDAP_SUCCESS && bdb->bi_txn_cp ) {
+       if( rs->sr_err == LDAP_SUCCESS && bdb->bi_txn_cp_kbyte ) {
                TXN_CHECKPOINT( bdb->bi_dbenv,
                        bdb->bi_txn_cp_kbyte, bdb->bi_txn_cp_min, 0 );
        }