From 42cb7f06f17b1d6cc42b0b1366a82aa5d21e22a7 Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Fri, 28 Jan 2011 16:33:55 +0000 Subject: [PATCH] cleanup: Rename rs_ensure_entry_modifiable(). The name rs_entry2modifiable() is more reasonably sized. For now, leave behind a macro rs_ensure_entry_modifiable in proto-slap.h. --- contrib/slapd-modules/cloak/cloak.c | 2 +- contrib/slapd-modules/dupent/dupent.c | 2 +- contrib/slapd-modules/usn/usn.c | 2 +- servers/slapd/overlays/collect.c | 2 +- servers/slapd/overlays/syncprov.c | 2 +- servers/slapd/overlays/valsort.c | 2 +- servers/slapd/proto-slap.h | 3 ++- servers/slapd/result.c | 2 +- 8 files changed, 9 insertions(+), 8 deletions(-) diff --git a/contrib/slapd-modules/cloak/cloak.c b/contrib/slapd-modules/cloak/cloak.c index ae4bca6388..fcb6a8025b 100644 --- a/contrib/slapd-modules/cloak/cloak.c +++ b/contrib/slapd-modules/cloak/cloak.c @@ -220,7 +220,7 @@ cloak_search_response_cb( Operation *op, SlapReply *rs ) /* * We are now committed to cloak an attribute. */ - rs_ensure_entry_modifiable( op, rs, (slap_overinst *) op->o_bd->bd_info ); + rs_entry2modifiable( op, rs, (slap_overinst *) op->o_bd->bd_info ); me = rs->sr_entry; for ( ci = (cloak_info_t *)sc->sc_private; ci; ci = ci->ci_next ) { diff --git a/contrib/slapd-modules/dupent/dupent.c b/contrib/slapd-modules/dupent/dupent.c index 50ae0ed6d1..257b5cd3ae 100644 --- a/contrib/slapd-modules/dupent/dupent.c +++ b/contrib/slapd-modules/dupent/dupent.c @@ -403,7 +403,7 @@ dupent_response_entry( Operation *op, SlapReply *rs ) return SLAP_CB_CONTINUE; } - rs_ensure_entry_modifiable( op, rs, dc->dc_on ); + rs_entry2modifiable( op, rs, dc->dc_on ); rs->sr_flags &= ~(REP_ENTRY_MODIFIABLE | REP_ENTRY_MUSTBEFREED); e = rs->sr_entry; diff --git a/contrib/slapd-modules/usn/usn.c b/contrib/slapd-modules/usn/usn.c index ed283bbb58..db4a3f5160 100644 --- a/contrib/slapd-modules/usn/usn.c +++ b/contrib/slapd-modules/usn/usn.c @@ -135,7 +135,7 @@ usn_operational( } if ( !ap ) { - if ( rs_ensure_entry_modifiable( op,rs, on )) { + if ( rs_entry2modifiable( op,rs, on )) { a = attr_find( rs->sr_entry->e_attrs, ad_usnChanged ); } diff --git a/servers/slapd/overlays/collect.c b/servers/slapd/overlays/collect.c index d484a4aff5..2fc08ed413 100644 --- a/servers/slapd/overlays/collect.c +++ b/servers/slapd/overlays/collect.c @@ -386,7 +386,7 @@ collect_response( Operation *op, SlapReply *rs ) * don't modify it directly. Make a copy and * work with that instead. */ - rs_ensure_entry_modifiable( op, rs, on ); + rs_entry2modifiable( op, rs, on ); /* Loop for each attribute in this collectinfo */ for(idx=0; idxci_ad_num; idx++) { diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c index 194fcf8679..508784c2da 100644 --- a/servers/slapd/overlays/syncprov.c +++ b/servers/slapd/overlays/syncprov.c @@ -2762,7 +2762,7 @@ syncprov_operational( } if ( !ap ) { - if ( rs_ensure_entry_modifiable( op, rs, on )) { + if ( rs_entry2modifiable( op, rs, on )) { a = attr_find( rs->sr_entry->e_attrs, slap_schema.si_ad_contextCSN ); } diff --git a/servers/slapd/overlays/valsort.c b/servers/slapd/overlays/valsort.c index f711b519c3..033cbf6d8c 100644 --- a/servers/slapd/overlays/valsort.c +++ b/servers/slapd/overlays/valsort.c @@ -297,7 +297,7 @@ valsort_response( Operation *op, SlapReply *rs ) a = attr_find( rs->sr_entry->e_attrs, vi->vi_ad ); if ( !a ) continue; - if ( rs_ensure_entry_modifiable( op, rs, on )) { + if ( rs_entry2modifiable( op, rs, on )) { a = attr_find( rs->sr_entry->e_attrs, vi->vi_ad ); } diff --git a/servers/slapd/proto-slap.h b/servers/slapd/proto-slap.h index dc05dae818..dd86bf9ed3 100644 --- a/servers/slapd/proto-slap.h +++ b/servers/slapd/proto-slap.h @@ -1578,8 +1578,9 @@ LDAP_SLAPD_F (void) rs_flush_entry LDAP_P(( Operation *op, SlapReply *rs, slap_overinst *on )); LDAP_SLAPD_F (void) rs_replace_entry LDAP_P(( Operation *op, SlapReply *rs, slap_overinst *on, Entry *e )); -LDAP_SLAPD_F (int) rs_ensure_entry_modifiable LDAP_P(( Operation *op, +LDAP_SLAPD_F (int) rs_entry2modifiable LDAP_P(( Operation *op, SlapReply *rs, slap_overinst *on )); +#define rs_ensure_entry_modifiable rs_entry2modifiable /* older name */ LDAP_SLAPD_F (void) slap_send_ldap_result LDAP_P(( Operation *op, SlapReply *rs )); LDAP_SLAPD_F (void) send_ldap_sasl LDAP_P(( Operation *op, SlapReply *rs )); LDAP_SLAPD_F (void) send_ldap_disconnect LDAP_P(( Operation *op, SlapReply *rs )); diff --git a/servers/slapd/result.c b/servers/slapd/result.c index 4161a0d3b7..0803f7fb80 100644 --- a/servers/slapd/result.c +++ b/servers/slapd/result.c @@ -268,7 +268,7 @@ rs_replace_entry( Operation *op, SlapReply *rs, slap_overinst *on, Entry *e ) * Return nonzero if rs->sr_entry was replaced. */ int -rs_ensure_entry_modifiable( Operation *op, SlapReply *rs, slap_overinst *on ) +rs_entry2modifiable( Operation *op, SlapReply *rs, slap_overinst *on ) { if ( rs->sr_flags & REP_ENTRY_MODIFIABLE ) { rs_assert_ok( rs ); -- 2.39.5