[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: SLAP_NVALUES in HEAD



The attached diff worked for me but I suspect it's not the right
solution.

-- luke

Index: schema_init.c
===================================================================
RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/schema_init.c,v
retrieving revision 1.268
diff -u -r1.268 schema_init.c
--- schema_init.c	24 Mar 2003 05:49:55 -0000	1.268
+++ schema_init.c	1 Apr 2003 07:35:35 -0000
@@ -61,8 +61,8 @@
 
 #define integerOrderingMatch			integerMatch
 #define integerFirstComponentMatch		NULL
-#define integerIndexer NULL
-#define integerFilter NULL
+//#define integerIndexer NULL
+//#define integerFilter NULL
 
 #define generalizedTimeMatch			caseIgnoreIA5Match
 #define generalizedTimeOrderingMatch	caseIgnoreIA5Match
@@ -2248,7 +2248,7 @@
 	return LDAP_SUCCESS;
 }
 
-#ifndef SLAP_NVALUES
+// #ifndef SLAP_NVALUES
 
 /* Index generation function */
 static int integerIndexer(
@@ -2283,8 +2283,11 @@
 
 	for( i=0; values[i].bv_val != NULL; i++ ) {
 		struct berval norm;
+#ifdef SLAP_NVALUES
+		integerNormalize( use, syntax, slap_schema.si_mr_integerMatch, &values[i], &norm );
+#else
 		xintegerNormalize( syntax, &values[i], &norm );
-
+#endif
 		HASH_Init( &HASHcontext );
 		if( prefix != NULL && prefix->bv_len > 0 ) {
 			HASH_Update( &HASHcontext,
@@ -2329,7 +2332,11 @@
 	slen = syntax->ssyn_oidlen;
 	mlen = mr->smr_oidlen;
 
+#ifdef SLAP_NVALUES
+	integerNormalize( use, syntax, slap_schema.si_mr_integerMatch, assertedValue, &norm );
+#else
 	xintegerNormalize( syntax, assertedValue, &norm );
+#endif
 
 	keys = ch_malloc( sizeof( struct berval ) * 2 );
 
@@ -2354,7 +2361,7 @@
 	return LDAP_SUCCESS;
 }
 
-#endif
+// #endif
 
 static int
 countryStringValidate(
--
Luke Howard | PADL Software Pty Ltd | www.padl.com