]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/add.c
ITS#8725 Add SLAPD_ASYNCOP return code
[openldap] / servers / slapd / add.c
index b46053d67065f1fc74c15157c198d6efd1201b68..d0b3b772fdfaac0b154452ccaeba31d78f5641f6 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2013 The OpenLDAP Foundation.
+ * Copyright 1998-2017 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -194,6 +194,11 @@ do_add( Operation *op, SlapReply *rs )
        rc = frontendDB->be_add( op, rs );
        LDAP_SLIST_REMOVE(&op->o_extra, &oex.oe, OpExtra, oe_next);
 
+       if ( rc == SLAPD_ASYNCOP ) {
+               /* skip cleanup */
+               return rc;
+       }
+
 #ifdef LDAP_X_TXN
        if ( rc == LDAP_X_TXN_SPECIFY_OKAY ) {
                /* skip cleanup */