]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-bdb/ctxcsn.c
Move MSVC port to the Attic
[openldap] / servers / slapd / back-bdb / ctxcsn.c
index 14c83edc0ea3348ce2fa902f035cfa844642f0a6..1127995de39c5344c260871abe6c3dc270687bbe 100644 (file)
@@ -50,12 +50,24 @@ bdb_csn_commit(
        size_t                  textlen = sizeof textbuf;
        EntryInfo               *eip = NULL;
 
+       assert( !BER_BVISNULL( &op->o_bd->be_context_csn ) );
+
        if ( ei ) {
                e = ei->bei_e;
        }
 
        rc =  bdb_dn2entry( op, tid, &op->o_bd->be_context_csn, &ctxcsn_ei,
                        1, locker, &ctxcsn_lock );
+       switch( rc ) {
+       case 0:
+       case DB_NOTFOUND:
+               break;
+       case DB_LOCK_DEADLOCK:
+       case DB_LOCK_NOTGRANTED:
+               return BDB_CSN_RETRY;
+       default:
+               return BDB_CSN_ABORT;
+       }
        
        *ctxcsn_e = ctxcsn_ei->bei_e;