]> git.sur5r.net Git - openldap/commitdiff
ITS#7061 only return requested attrs in sssvlv response
authorHoward Chu <hyc@openldap.org>
Tue, 1 Nov 2011 18:23:59 +0000 (11:23 -0700)
committerQuanah Gibson-Mount <quanah@openldap.org>
Thu, 3 Nov 2011 00:22:22 +0000 (17:22 -0700)
Replaces commit 8eecc9a017584ea0b56b25f0e4750e3b16929de6

servers/slapd/overlays/sssvlv.c

index ea7f769cde7f1bfb6287b3e784674efb5f7804b0..0cb7a7e84521c5f33ba2f940793a3fbe5ed526aa 100644 (file)
@@ -436,6 +436,8 @@ static void send_list(
        Entry *e;
        LDAPControl *ctrls[2];
 
+       rs->sr_attrs = op->ors_attrs;
+
        /* FIXME: it may be better to just flatten the tree into
         * an array before doing all of this...
         */
@@ -586,6 +588,8 @@ static void send_page( Operation *op, SlapReply *rs, sort_op *so )
        Entry *e;
        int rc;
 
+       rs->sr_attrs = op->ors_attrs;
+
        while ( cur_node && rs->sr_nentries < so->so_page_size ) {
                sort_node *sn = cur_node->avl_data;
 
@@ -630,8 +634,6 @@ static void send_entry(
        if ( !so->so_tree )
                return;
 
-       rs->sr_attrs = op->ors_attrs;
-
        /* RFC 2891: If critical then send the entries iff they were
         * succesfully sorted.  If non-critical send all entries
         * whether they were sorted or not.