if( rc == -1 ) return rc;
}
-#ifdef SLAP_SORTED_RESULTS
+#ifdef SLAP_CONTROL_X_SORTEDRESULTS
/* this is a hack to avoid having to modify op->s_ctrls */
if( o->o_sortedresults ) {
BerElementBuffer berbuf;
} else {
rs->sr_rspoid = LDAP_NOTICE_DISCONNECT;
rs->sr_tag = LDAP_RES_EXTENDED;
- rs->sr_msgid = 0;
+ rs->sr_msgid = LDAP_RES_UNSOLICITED;
}
if ( send_ldap_response( op, rs ) == SLAP_CB_CONTINUE ) {
return LDAP_SIZELIMIT_EXCEEDED;
}
+ /* Every 64 entries, check for thread pool pause */
+ if (( rs->sr_nentries & 0x3f == 0x3f ) &&
+ ldap_pvt_thread_pool_query( &connection_pool,
+ LDAP_PVT_THREAD_POOL_PARAM_PAUSING, &i ) == 0 && i ) {
+ return LDAP_BUSY;
+ }
+
rs->sr_type = REP_SEARCH;
/* eventually will loop through generated operational attribute types