Resolves: bug 457951
Bug Description: The DNA plug-in uses a range search internally to
locate the next
free value within the managed range. This works fine when the values
integers, but the DNA plug-in supports a prefix to the integer portion
value (such as "user1 - user1000").
Reviewed by: ???
Files: see diff
Fix Description: When a prefix is defined, we should not use a range
search to locate
the next free value. We should simply do an exact match search to see
if the next
value in the cached configuration entry is free. If it is not free,
through each value in the range until we either find a free value, or
end of the range. This will typically perform fine, as the next value
configuration entry should be free unless someone manually assigned
worst case scenario is that we have to go through a large block of
was manually assigned, which will be helped by an equality index.
this case should be rare.
For efficiency in the case that we have to go through a large block of
assigned values, I wanted to reuse a previously allocated pblock
allocating one for each search. This required me to export a new
function that re-initializes a pblock so it can be reused.
Platforms tested: Fedora 8 x86_64
Flag Day: no
Doc impact: Yes. We need to doc the new slapi_pblock_init() function in
the plug-in guide.