[389-devel] Please review: [389 Project] #531: loading an entry from the database should use str2entry_fast

Noriko Hosoi nhosoi at redhat.com
Mon Dec 10 18:48:35 UTC 2012


https://fedorahosted.org/389/ticket/531

https://fedorahosted.org/389/attachment/ticket/531/0001-Trac-Ticket-531-loading-an-entry-from-the-database-s.patch

Bug Description: When loading an entry from the backend, it
is known to be well formed and str2entry_fast() could be used,
but always str2entry_dupcheck() is called.  The reason is that
id2entry() sets the flag SLAPI_STR2ENTRY_NO_ENTRYDN and this
flag is not contained in the set of flags known to be handled
by str2entry_fast() although it does have code for this flag.

Fix Description: This patch is adding flags SLAPI_STR2ENTRY_
NO_ENTRYDN and SLAPI_STR2ENTRY_DN_NORMALIZED to the local
macro SLAPI_STRENTRY_FLAGS_HANDLED_IN_SLAPI_STR2ENTRY,
which is used to determine the string formatted entry can be
processed by str2entry_fast or not. Also, this patch defines
a macro str2entry_can_use_fast to increase the code readability.


More information about the 389-devel mailing list