summaryrefslogtreecommitdiff
path: root/source4/lib/ldb
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-11-30 10:44:49 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:28:41 -0500
commit875a920ac2d67c9e98100ff2df20b1e7d3951d14 (patch)
treef625248c048277f4415087b651636f4b84615556 /source4/lib/ldb
parentaee9e6c7cdc46640a5dc8e95c1e4c16057d74b29 (diff)
downloadsamba-875a920ac2d67c9e98100ff2df20b1e7d3951d14.tar.gz
samba-875a920ac2d67c9e98100ff2df20b1e7d3951d14.tar.bz2
samba-875a920ac2d67c9e98100ff2df20b1e7d3951d14.zip
r19966: we don't need 2 versions of this functions
metze (This used to be commit 98ab0af4ae0d716f27bc48b699f52d34dc2f8507)
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r--source4/lib/ldb/common/ldb_attributes.c38
1 files changed, 4 insertions, 34 deletions
diff --git a/source4/lib/ldb/common/ldb_attributes.c b/source4/lib/ldb/common/ldb_attributes.c
index 75a4b60759..d52264b90f 100644
--- a/source4/lib/ldb/common/ldb_attributes.c
+++ b/source4/lib/ldb/common/ldb_attributes.c
@@ -71,46 +71,16 @@ int ldb_set_attrib_handlers(struct ldb_context *ldb,
}
-/*
- default function for read/write/canonicalise
-*/
-static int ldb_default_copy(struct ldb_context *ldb,
- void *mem_ctx,
- const struct ldb_val *in,
- struct ldb_val *out)
-{
- *out = ldb_val_dup(mem_ctx, in);
-
- if (out->data == NULL && in->data != NULL) {
- return -1;
- }
-
- return 0;
-}
-
-/*
- default function for comparison
-*/
-static int ldb_default_cmp(struct ldb_context *ldb,
- void *mem_ctx,
- const struct ldb_val *v1,
- const struct ldb_val *v2)
-{
- if (v1->length != v2->length) {
- return v1->length - v2->length;
- }
- return memcmp(v1->data, v2->data, v1->length);
-}
/*
default handler function pointers
*/
static const struct ldb_attrib_handler ldb_default_attrib_handler = {
.attr = NULL,
- .ldif_read_fn = ldb_default_copy,
- .ldif_write_fn = ldb_default_copy,
- .canonicalise_fn = ldb_default_copy,
- .comparison_fn = ldb_default_cmp,
+ .ldif_read_fn = ldb_handler_copy,
+ .ldif_write_fn = ldb_handler_copy,
+ .canonicalise_fn = ldb_handler_copy,
+ .comparison_fn = ldb_comparison_binary,
};
/*