mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-21 07:09:34 -05:00
ITS#6758 rs_reinit() += slap_reply_t parameter
This commit is contained in:
parent
b120b2a05b
commit
cb15a4c687
2 changed files with 9 additions and 5 deletions
|
|
@ -1544,13 +1544,18 @@ LDAP_SLAPD_F (int) get_alias_dn LDAP_P((
|
||||||
# define rs_assert_ok(rs) ((void) (rs))
|
# define rs_assert_ok(rs) ((void) (rs))
|
||||||
# define rs_assert_ready(rs) ((void) (rs))
|
# define rs_assert_ready(rs) ((void) (rs))
|
||||||
# define rs_assert_done(rs) ((void) (rs))
|
# define rs_assert_done(rs) ((void) (rs))
|
||||||
# define rs_reinit(rs) ((void) memset( rs, 0, sizeof(SlapReply) ))
|
|
||||||
#endif
|
#endif
|
||||||
LDAP_SLAPD_F (void) (rs_assert_ok) LDAP_P(( const SlapReply *rs ));
|
LDAP_SLAPD_F (void) (rs_assert_ok) LDAP_P(( const SlapReply *rs ));
|
||||||
LDAP_SLAPD_F (void) (rs_assert_ready) LDAP_P(( const SlapReply *rs ));
|
LDAP_SLAPD_F (void) (rs_assert_ready) LDAP_P(( const SlapReply *rs ));
|
||||||
LDAP_SLAPD_F (void) (rs_assert_done) LDAP_P(( const SlapReply *rs ));
|
LDAP_SLAPD_F (void) (rs_assert_done) LDAP_P(( const SlapReply *rs ));
|
||||||
|
|
||||||
LDAP_SLAPD_F (void) (rs_reinit) LDAP_P(( SlapReply *rs ));
|
#define rs_reinit(rs, type) do { \
|
||||||
|
SlapReply *const rsRI = (rs); \
|
||||||
|
rs_assert_done( rsRI ); \
|
||||||
|
memset( rsRI, 0, sizeof(*rsRI) ); \
|
||||||
|
rsRI->sr_type = (type); \
|
||||||
|
} while ( 0 )
|
||||||
|
LDAP_SLAPD_F (void) (rs_reinit) LDAP_P(( SlapReply *rs, slap_reply_t type ));
|
||||||
LDAP_SLAPD_F (void) rs_flush_entry LDAP_P(( Operation *op,
|
LDAP_SLAPD_F (void) rs_flush_entry LDAP_P(( Operation *op,
|
||||||
SlapReply *rs, slap_overinst *on ));
|
SlapReply *rs, slap_overinst *on ));
|
||||||
LDAP_SLAPD_F (void) rs_replace_entry LDAP_P(( Operation *op,
|
LDAP_SLAPD_F (void) rs_replace_entry LDAP_P(( Operation *op,
|
||||||
|
|
|
||||||
|
|
@ -192,10 +192,9 @@ void
|
||||||
|
|
||||||
/* Reset a used SlapReply whose contents has been flushed (freed/released) */
|
/* Reset a used SlapReply whose contents has been flushed (freed/released) */
|
||||||
void
|
void
|
||||||
(rs_reinit)( SlapReply *rs )
|
(rs_reinit)( SlapReply *rs, slap_reply_t type )
|
||||||
{
|
{
|
||||||
rs_assert_done( rs );
|
rs_reinit( rs, type ); /* proto-slap.h macro */
|
||||||
memset( rs, 0, sizeof(SlapReply) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Obey and clear rs->sr_flags & REP_ENTRY_MASK. Clear sr_entry if freed. */
|
/* Obey and clear rs->sr_flags & REP_ENTRY_MASK. Clear sr_entry if freed. */
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue