svn commit: samba r19966 - in branches/SAMBA_4_0/source/lib/ldb/common: .

metze at samba.org metze at samba.org
Thu Nov 30 10:44:49 GMT 2006


Author: metze
Date: 2006-11-30 10:44:49 +0000 (Thu, 30 Nov 2006)
New Revision: 19966

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19966

Log:
we don't need 2 versions of this functions

metze
Modified:
   branches/SAMBA_4_0/source/lib/ldb/common/ldb_attributes.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb_attributes.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/common/ldb_attributes.c	2006-11-30 10:16:19 UTC (rev 19965)
+++ branches/SAMBA_4_0/source/lib/ldb/common/ldb_attributes.c	2006-11-30 10:44:49 UTC (rev 19966)
@@ -71,46 +71,16 @@
 }
 			  
 
-/*
-  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,
 };
 
 /*



More information about the samba-cvs mailing list