]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/ad.c
Switch example slapd.conf to use mdb instead of bdb
[openldap] / servers / slapd / ad.c
index 2a083cf0070b913535b47d0939b17b2bb2485892..71ea438a27f23d3cd8cf70df8ab711b7b017eeb7 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2012 The OpenLDAP Foundation.
+ * Copyright 1998-2013 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -844,6 +844,9 @@ undef_promote(
                        tmp->ad_next = NULL;
                        /* ad_cname was contiguous, no leak here */
                        tmp->ad_cname = nat->sat_cname;
+                       ldap_pvt_thread_mutex_lock( &ad_index_mutex );
+                       tmp->ad_index = ++ad_count;
+                       ldap_pvt_thread_mutex_unlock( &ad_index_mutex );
                        *n_ad = tmp;
                        n_ad = &tmp->ad_next;
                } else {