diff options
Diffstat (limited to 'ldap/servers')
-rw-r--r-- | ldap/servers/slapd/back-ldbm/dblayer.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ldap/servers/slapd/back-ldbm/dblayer.c b/ldap/servers/slapd/back-ldbm/dblayer.c index a052d00b..9a9f6af0 100644 --- a/ldap/servers/slapd/back-ldbm/dblayer.c +++ b/ldap/servers/slapd/back-ldbm/dblayer.c @@ -2812,7 +2812,12 @@ _dblayer_set_db_callbacks(dblayer_private *priv, DB *dbp, struct attrinfo *ai) if (rc) return rc; - rc = dbp->set_dup_compare( dbp, idl_new_compare_dups); + if (ai->ai_dup_cmp_fn) { + /* If set, use the special dup compare callback */ + rc = dbp->set_dup_compare(dbp, ai->ai_dup_cmp_fn); + } else { + rc = dbp->set_dup_compare(dbp, idl_new_compare_dups); + } if (rc) return rc; } |