mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-27 18:19:52 -05:00
Added Entry->e_bv for entry_decode
This commit is contained in:
parent
2367a31872
commit
1226d620e0
2 changed files with 9 additions and 2 deletions
|
|
@ -24,7 +24,7 @@ static int emaxsize;/* max size of ebuf */
|
|||
/*
|
||||
* Empty root entry
|
||||
*/
|
||||
const Entry slap_entry_root = { NOID, { 0, "" }, { 0, "" }, NULL, 0, NULL };
|
||||
const Entry slap_entry_root = { NOID, { 0, "" }, { 0, "" }, NULL, 0, { 0, "" }, NULL };
|
||||
|
||||
int entry_destroy(void)
|
||||
{
|
||||
|
|
@ -363,6 +363,11 @@ entry_free( Entry *e )
|
|||
e->e_ndn = NULL;
|
||||
}
|
||||
|
||||
if ( e->e_bv.bv_val != NULL ) {
|
||||
free( e->e_bv.bv_val );
|
||||
e->e_bv.bv_val = NULL;
|
||||
}
|
||||
|
||||
/* free attributes */
|
||||
attrs_free( e->e_attrs );
|
||||
e->e_attrs = NULL;
|
||||
|
|
@ -575,7 +580,7 @@ int entry_decode(struct berval *bv, Entry **e)
|
|||
"entry_decode: \"%s\"\n",
|
||||
x->e_dn, 0, 0 );
|
||||
#endif
|
||||
x->e_private = bv->bv_val;
|
||||
x->e_bv = *bv;
|
||||
|
||||
/* A valid entry must have at least one attr, so this
|
||||
* pointer can never be NULL
|
||||
|
|
|
|||
|
|
@ -756,6 +756,8 @@ typedef struct slap_entry {
|
|||
|
||||
slap_mask_t e_ocflags;
|
||||
|
||||
struct berval e_bv; /* For entry_encode/entry_decode */
|
||||
|
||||
/* for use by the backend for any purpose */
|
||||
void* e_private;
|
||||
} Entry;
|
||||
|
|
|
|||
Loading…
Reference in a new issue