From 2bb75d54691e8c07b2974db6acda010a6b641fb6 Mon Sep 17 00:00:00 2001 From: Jong Hyuk Choi Date: Mon, 1 Dec 2003 17:56:36 +0000 Subject: [PATCH] misc cleanup --- servers/slapd/add.c | 7 +++++-- servers/slapd/back-meta/cache-merge.c | 4 +++- servers/slapd/proto-slap.h | 3 ++- servers/slapd/tools/mimic.c | 3 ++- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/servers/slapd/add.c b/servers/slapd/add.c index 7824ca212b..b951f406ce 100644 --- a/servers/slapd/add.c +++ b/servers/slapd/add.c @@ -588,7 +588,8 @@ int slap_entry2mods( Entry *e, Modifications **mods, - const char **text + const char **text, + char *textbuf, size_t textlen ) ) { Modifications *modhead = NULL; @@ -596,7 +597,9 @@ slap_entry2mods( Modifications **modtail = &modhead; Attribute *a_new; AttributeDescription *a_new_desc; - int i, count, rc; + int i, count; + + *text = textbuf; a_new = e->e_attrs; diff --git a/servers/slapd/back-meta/cache-merge.c b/servers/slapd/back-meta/cache-merge.c index d2ad3338d8..e6cce64bc8 100644 --- a/servers/slapd/back-meta/cache-merge.c +++ b/servers/slapd/back-meta/cache-merge.c @@ -112,6 +112,8 @@ merge_entry( BerVarray value_array; Attribute *uuid_attr, *attr; Entry *e; + char textbuf[SLAP_TEXT_BUFLEN]; + size_t textlen = sizeof(textbuf); SlapReply sreply = {REP_RESULT}; @@ -176,7 +178,7 @@ merge_entry( if ( rc != LDAP_SUCCESS ) { if ( rc == LDAP_ALREADY_EXISTS ) { - slap_entry2mods( e, &modlist, &text ); + slap_entry2mods( e, &modlist, &text, textbuf, textlen ); op_tmp.o_tag = LDAP_REQ_MODIFY; op_tmp.orm_modlist = modlist; op_tmp.o_req_dn = e->e_name; diff --git a/servers/slapd/proto-slap.h b/servers/slapd/proto-slap.h index 59712f87dc..fe119359ad 100644 --- a/servers/slapd/proto-slap.h +++ b/servers/slapd/proto-slap.h @@ -118,7 +118,8 @@ LDAP_SLAPD_F (int) slap_mods2entry LDAP_P(( Modifications *mods, Entry **e, int repl_user, int dup, const char **text, char *textbuf, size_t textlen )); LDAP_SLAPD_F (int) slap_entry2mods LDAP_P(( Entry *e, - Modifications **mods, const char **text )); + Modifications **mods, const char **text, + char *textbuf, size_t textlen )); /* * at.c diff --git a/servers/slapd/tools/mimic.c b/servers/slapd/tools/mimic.c index b3eaa6fe8c..387eef2988 100644 --- a/servers/slapd/tools/mimic.c +++ b/servers/slapd/tools/mimic.c @@ -280,7 +280,8 @@ int root_dse_info( Connection *conn, Entry **entry, const char **text ) return -1; } -int slap_entry2mods( Entry *e, Modifications **mods, const char **text ) +int slap_entry2mods( Entry *e, Modifications **mods, const char **text, + char *textbuf, size_t textlen ) { return -1; } -- 2.39.5