summaryrefslogtreecommitdiff
path: root/source/lib/ldb/ldb_tdb/ldb_tdb.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-12-15 13:08:57 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:29:19 -0500
commitb97b8f5dcbce006f005e53ca79df3330e62f117b (patch)
treeb4e3b2e41a8c0c3d76f8965748b0322b68ad0320 /source/lib/ldb/ldb_tdb/ldb_tdb.c
parent1f67433914bfab83bf1950263809c9e152ad6dcc (diff)
downloadsamba-b97b8f5dcbce006f005e53ca79df3330e62f117b.tar.gz
r20184: change ldb_attrib_handler into ldb_schema_attribute, which has a pointer
to a ldb_schema_syntax struct. the default attribute handler is now registered dynamicly as "*" attribute, instead of having its own code path. ldb_schema_attribute's can be added to the ldb_schema given a ldb_schema_syntax struct or the syntax name we may also need to introduce a ldb_schema_matching_rule, and add a pointer to a default ldb_schema_matching_rule in the ldb_schema_syntax. metze
Diffstat (limited to 'source/lib/ldb/ldb_tdb/ldb_tdb.c')
-rw-r--r--source/lib/ldb/ldb_tdb/ldb_tdb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/lib/ldb/ldb_tdb/ldb_tdb.c b/source/lib/ldb/ldb_tdb/ldb_tdb.c
index 09ddca50342..6adf6f48cae 100644
--- a/source/lib/ldb/ldb_tdb/ldb_tdb.c
+++ b/source/lib/ldb/ldb_tdb/ldb_tdb.c
@@ -558,7 +558,7 @@ static int msg_delete_element(struct ldb_module *module,
unsigned int i;
int found;
struct ldb_message_element *el;
- const struct ldb_attrib_handler *h;
+ const struct ldb_schema_attribute *a;
found = find_element(msg, name);
if (found == -1) {
@@ -567,10 +567,10 @@ static int msg_delete_element(struct ldb_module *module,
el = &msg->elements[found];
- h = ldb_attrib_handler(ldb, el->name);
+ a = ldb_schema_attribute_by_name(ldb, el->name);
for (i=0;i<el->num_values;i++) {
- if (h->comparison_fn(ldb, ldb, &el->values[i], val) == 0) {
+ if (a->syntax->comparison_fn(ldb, ldb, &el->values[i], val) == 0) {
if (i<el->num_values-1) {
memmove(&el->values[i], &el->values[i+1],
sizeof(el->values[i])*(el->num_values-(i+1)));