summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_tdb/ldb_index.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-12-19 10:56:29 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:07:31 -0500
commitcf4298874c01644eaedb8f80eec131ec5a220e08 (patch)
treea724565830c9bae132ffa5edd5fd287326c951ff /source4/lib/ldb/ldb_tdb/ldb_index.c
parent134769f9ad58c3431ddb2924e1231be3b16acdbe (diff)
downloadsamba-cf4298874c01644eaedb8f80eec131ec5a220e08.tar.gz
samba-cf4298874c01644eaedb8f80eec131ec5a220e08.tar.bz2
samba-cf4298874c01644eaedb8f80eec131ec5a220e08.zip
r4281: fixed an ldb indexing bug in ldb found by volker.
index entries were not always being removed on modify (This used to be commit 9c668e7b43dc2d82d3d639b64c53e887723ccba7)
Diffstat (limited to 'source4/lib/ldb/ldb_tdb/ldb_index.c')
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_index.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_index.c b/source4/lib/ldb/ldb_tdb/ldb_index.c
index df0a436172..b0a1b0f89f 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_index.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_index.c
@@ -746,8 +746,8 @@ int ltdb_index_add(struct ldb_module *module, const struct ldb_message *msg)
/*
delete an index entry for one message element
*/
-static int ltdb_index_del1(struct ldb_module *module, const char *dn,
- struct ldb_message_element *el, int v_idx)
+int ltdb_index_del_value(struct ldb_module *module, const char *dn,
+ struct ldb_message_element *el, int v_idx)
{
struct ldb_context *ldb = module->ldb;
struct ldb_message msg;
@@ -826,7 +826,7 @@ int ltdb_index_del(struct ldb_module *module, const struct ldb_message *msg)
continue;
}
for (j=0;j<msg->elements[i].num_values;j++) {
- ret = ltdb_index_del1(module, msg->dn, &msg->elements[i], j);
+ ret = ltdb_index_del_value(module, msg->dn, &msg->elements[i], j);
if (ret == -1) {
return -1;
}