mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
clear pagedresults_state if reusing an inactive connection; prepare for more consistent behavior of pagedResults control
This commit is contained in:
parent
ff35e820dd
commit
528b6c7e25
@ -1573,6 +1573,10 @@ connection_input(
|
|||||||
op->o_preread_attrs = NULL;
|
op->o_preread_attrs = NULL;
|
||||||
op->o_postread_attrs = NULL;
|
op->o_postread_attrs = NULL;
|
||||||
op->o_vrFilter = NULL;
|
op->o_vrFilter = NULL;
|
||||||
|
/* clear state if the connection is being reused from inactive */
|
||||||
|
if ( conn->c_conn_state == SLAP_C_INACTIVE ) {
|
||||||
|
memset( &conn->c_pagedresults_state, 0, sizeof( conn->c_pagedresults_state ) );
|
||||||
|
}
|
||||||
op->o_pagedresults_state = conn->c_pagedresults_state;
|
op->o_pagedresults_state = conn->c_pagedresults_state;
|
||||||
|
|
||||||
op->o_res_ber = NULL;
|
op->o_res_ber = NULL;
|
||||||
|
@ -917,6 +917,16 @@ static int parsePagedResults (
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
/* Initial request. Initialize state. */
|
/* Initial request. Initialize state. */
|
||||||
|
#if 0
|
||||||
|
if ( op->o_conn->c_pagedresults_state.ps_cookie != 0 ) {
|
||||||
|
/* There's another pagedResults control on the
|
||||||
|
* same connection; reject new pagedResults controls
|
||||||
|
* (allowed by RFC2696) */
|
||||||
|
rs->sr_text = "paged results cookie unavailable; try later";
|
||||||
|
rc = LDAP_UNWILLING_TO_PERFORM;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
op->o_pagedresults_state.ps_cookie = 0;
|
op->o_pagedresults_state.ps_cookie = 0;
|
||||||
op->o_pagedresults_state.ps_count = 0;
|
op->o_pagedresults_state.ps_count = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user