[Date Prev][Date Next]
Re: idl_delete bug in back-ldbm?
At 11:10 AM 4/6/99 +0200, bert hubert wrote:
>I had a problem that deleting entries from my gdbm OpenLDAP 1.2 directory
>gave me an Operations Error. Stepping through idl.c I found that it barfed
>I don't quite understand
>what this idl_delete_key does - I can't find any line actually deleting
Look closily. If the id was the only one in the list,
ldbm_cache_delete() is called. If the id isn't the only
one on the list, the id is removed using SAFEMEMCPY()
and stores the new list using idl_store().
>All it seems to do is store a key somewhere - that also doesn't
>seem to be used.
It's actually storing a list of ids.
>I've replaced the return -1; by:
> return 0; /* deleted already - don't bother - AHU */
This only changes behavior when the id is in a direct IDList.
>Was this the right thing to do?
It's probably better to change the caller to ignore the error
(after logging it). I'll commit such a change to -devel.
>What does it mean when it can't find the ID?
It could have been deleted by a prior delete operation that
failed. Hence, ignoring the error is likely the most appropriate
solution for now.