Re: Please review: OpenLDAP support
by Howard Chu
> Message: 1
> Date: Mon, 06 Jul 2009 13:20:22 -0600
> From: Rich Megginson<rmeggins(a)redhat.com>
> Note - the patch does not contain the diffs for configure nor Makefile.in
> http://rmeggins.fedorapeople.org/0001-OpenLDAP-support.patch
We probably should talk about exposing the UTF8 APIs. The only reason they
were kept private is because they weren't part of the RFC1823 or the expired C
API draft, but they've been present for at least the past 9 years.
re: ldif_read_record() and the public LDIF API, note our ITS#5892; some of the
function signatures here will change soon so that error can be distinguished
from EOF. (But since 2.4's APIs are supposed to be frozen it may wait until 2.5.)
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
14 years, 8 months
[PATCH] Bug: 509401 - dnaNextValue not updated when dnaMaxValue set to -1
by Nathan Kinder
>From fe97a63dcd53bedf7b06435f32630f419da1be79 Mon Sep 17 00:00:00 2001
From: Nathan Kinder <nkinder(a)redhat.com>
Date: Thu, 2 Jul 2009 08:49:52 -0700
Subject: [PATCH] Bug: 509401 - dnaNextValue not updated when dnaMaxValue set to -1
When "dnaMaxValue" is set to "-1" or omitted from a range configuration entry
(which defautls to "-1" internally), the "dnaNextValue" attribute is not
updated in the range configuration entry when a value is allocated from that
range.
We were only updating the configuration entry if the new nextvalue was >=
the maxval plus the interval (1). We need to check if the maxval is -1
specifically, and update the config entry if so.
---
ldap/servers/plugins/dna/dna.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/ldap/servers/plugins/dna/dna.c b/ldap/servers/plugins/dna/dna.c
index dfd0619..0f509c0 100644
--- a/ldap/servers/plugins/dna/dna.c
+++ b/ldap/servers/plugins/dna/dna.c
@@ -1972,7 +1972,8 @@ static int dna_get_next_value(struct configEntry *config_entry,
nextval = setval + config_entry->interval;
/* update nextval if we have not reached the end
* of our current range */
- if (nextval <= (config_entry->maxval + config_entry->interval)) {
+ if ((config_entry->maxval == -1) ||
+ (nextval <= (config_entry->maxval + config_entry->interval))) {
/* try to set the new next value in the config entry */
PR_snprintf(next_value, sizeof(next_value),"%" NSPRIu64, nextval);
--
1.6.0.6
14 years, 9 months