]> git.sur5r.net Git - openldap/commitdiff
don't mix code and declarations
authorPierangelo Masarati <ando@openldap.org>
Thu, 8 Apr 2010 00:27:18 +0000 (00:27 +0000)
committerPierangelo Masarati <ando@openldap.org>
Thu, 8 Apr 2010 00:27:18 +0000 (00:27 +0000)
servers/slapd/backglue.c

index f983bd01131fe450f26294b8a83bb787cf8c15b6..2f7908c348d1a76037073aaf5443272b61dafac9 100644 (file)
@@ -586,6 +586,11 @@ glue_op_search ( Operation *op, SlapReply *rs )
                                                                assert( tag != LBER_ERROR );
 
                                                                if ( BER_BVISEMPTY( &cookie ) ) {
+                                                                       /* delete old, create new cookie with NOID */
+                                                                       PagedResultsCookie respcookie = (PagedResultsCookie)NOID;
+                                                                       ber_len_t oidlen = strlen( gs.ctrls[c]->ldctl_oid );
+                                                                       LDAPControl *newctrl;
+
                                                                        if ( btmp == b0 ) {
                                                                                op->o_conn->c_pagedresults_state.ps_be = gi->gi_n[gi->gi_nodes - 1].gn_be;
 
@@ -593,11 +598,6 @@ glue_op_search ( Operation *op, SlapReply *rs )
                                                                                op->o_conn->c_pagedresults_state.ps_be = gi->gi_n[(i > 0 ? i - 1: 0)].gn_be;
                                                                        }
 
-                                                                       /* delete old, create new cookie with NOID */
-                                                                       PagedResultsCookie respcookie = (PagedResultsCookie)NOID;
-                                                                       ber_len_t oidlen = strlen( gs.ctrls[c]->ldctl_oid );
-                                                                       LDAPControl *newctrl;
-
                                                                        cookie.bv_val = (char *)&respcookie;
                                                                        cookie.bv_len = sizeof( PagedResultsCookie );