From 55bd34079c27332603d4ba9378b2391a08a45c86 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Mon, 30 Jul 2007 16:32:59 +0000 Subject: [PATCH] return entry controls (partially fixes ITS#4591) --- servers/slapd/back-meta/search.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/servers/slapd/back-meta/search.c b/servers/slapd/back-meta/search.c index 59f6d905d9..1f508b19f7 100644 --- a/servers/slapd/back-meta/search.c +++ b/servers/slapd/back-meta/search.c @@ -1997,8 +1997,12 @@ meta_send_entry( attrp = &attr->a_next; next_attr:; } + + ldap_get_entry_controls( mc->mc_conns[target].msc_ld, + e, &rs->sr_ctrls ); rs->sr_entry = &ent; rs->sr_attrs = op->ors_attrs; + rs->sr_operational_attrs = NULL; rs->sr_flags = 0; rs->sr_err = LDAP_SUCCESS; rc = send_search_entry( op, rs ); @@ -2009,7 +2013,10 @@ next_attr:; } rs->sr_entry = NULL; rs->sr_attrs = NULL; - + if ( rs->sr_ctrls != NULL ) { + ldap_controls_free( rs->sr_ctrls ); + rs->sr_ctrls = NULL; + } if ( !BER_BVISNULL( &ent.e_name ) ) { free( ent.e_name.bv_val ); BER_BVZERO( &ent.e_name ); -- 2.39.5