goto done;
}
#endif
-
- break;
-
- case LDAP_RES_EXTENDED_PARTIAL:
- npartial++;
- print_partial( ld, msg );
break;
case LDAP_RES_SEARCH_RESULT:
goto done;
-#ifdef LDAP_SYNC
- case LDAP_RES_INTERMEDIATE_RESP:
- ldap_parse_intermediate_resp_result( ld, msg, &retoid, &retdata, 0 );
+ case LDAP_RES_INTERMEDIATE:
+ npartial++;
+#ifndef LDAP_SYNC
+ print_partial( ld, msg );
+#else
+ ldap_parse_intermediate( ld, msg,
+ &retoid, &retdata, NULL, 0 );
+
nresponses_psearch = 0;
- if ( strcmp( retoid, LDAP_SYNC_INFO ) ) {
- printf(_("Unexpected Intermediate Response\n"));
- ldap_memfree( retoid );
- ber_bvfree( retdata );
- goto done;
- } else {
+ if ( strcmp( retoid, LDAP_SYNC_INFO ) == 0 ) {
printf(_("SyncInfo Received\n"));
ldap_memfree( retoid );
ber_bvfree( retdata );
break;
}
+
+ print_partial( ld, msg );
+ ldap_memfree( retoid );
+ ber_bvfree( retdata );
+ goto done;
#endif
}
printf(_("# extended partial response\n"));
}
- rc = ldap_parse_extended_partial( ld, partial,
+ rc = ldap_parse_intermediate( ld, partial,
&retoid, &retdata, &ctrls, 0 );
if( rc != LDAP_SUCCESS ) {
- ldap_perror(ld, "ldap_parse_extended_partial");
+ ldap_perror(ld, "ldap_parse_intermediate");
exit( EXIT_FAILURE );
}
#define LDAP_RES_RENAME LDAP_RES_MODDN /* application + constructed */
#define LDAP_RES_COMPARE ((ber_tag_t) 0x6fU) /* application + constructed */
#define LDAP_RES_EXTENDED ((ber_tag_t) 0x78U) /* V3: application + constructed */
-#define LDAP_RES_EXTENDED_PARTIAL ((ber_tag_t) 0x79U) /* V3+: application + constructed */
-#define LDAP_RES_INTERMEDIATE_RESP ((ber_tag_t) 0x7aU)
+#define LDAP_RES_INTERMEDIATE ((ber_tag_t) 0x79U) /* V3+: application + constructed */
#define LDAP_RES_ANY (-1)
#define LDAP_RES_UNSOLICITED (0)
int freeit ));
LDAP_F( int )
-ldap_parse_extended_partial LDAP_P((
+ldap_parse_intermediate LDAP_P((
LDAP *ld,
LDAPMessage *res,
char **retoidp,
LDAPControl ***serverctrls,
int freeit ));
-LDAP_F( int )
-ldap_parse_intermediate_resp_result LDAP_P((
- LDAP *ld,
- LDAPMessage *res,
- char **retoidp,
- struct berval **retdatap,
- int freeit ));
-
/*
* in abandon.c:
*/
* top-level directory of the distribution.
*/
-#ifdef LDAP_SYNCREPL
+#ifndef LDAP_RQ_H
+#define LDAP_RQ_H 1
+
+#include <ldap_cdefs.h>
+
+LDAP_BEGIN_DECL
typedef struct re_s {
struct timeval next_sched;
struct runqueue_s* rq
);
+LDAP_END_DECL
+
#endif
/* skip over entries and references */
if( lm->lm_msgtype != LDAP_RES_SEARCH_ENTRY &&
lm->lm_msgtype != LDAP_RES_SEARCH_REFERENCE &&
- lm->lm_msgtype != LDAP_RES_EXTENDED_PARTIAL )
+ lm->lm_msgtype != LDAP_RES_INTERMEDIATE )
{
break;
}
/* skip over entries and references */
if( lm->lm_msgtype != LDAP_RES_SEARCH_ENTRY &&
lm->lm_msgtype != LDAP_RES_SEARCH_REFERENCE &&
- lm->lm_msgtype != LDAP_RES_EXTENDED_PARTIAL )
+ lm->lm_msgtype != LDAP_RES_INTERMEDIATE )
{
/* more results to return */
errcode = LDAP_MORE_RESULTS_TO_RETURN;
/* Parse an extended partial */
int
-ldap_parse_extended_partial (
+ldap_parse_intermediate (
LDAP *ld,
LDAPMessage *res,
char **retoidp,
assert( res != NULL );
#ifdef NEW_LOGGING
- LDAP_LOG ( OPERATION, ENTRY, "ldap_parse_extended_partial\n", 0,0,0 );
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_parse_intermediate\n", 0,0,0 );
#else
- Debug( LDAP_DEBUG_TRACE, "ldap_parse_extended_partial\n", 0, 0, 0 );
+ Debug( LDAP_DEBUG_TRACE, "ldap_parse_intermediate\n", 0, 0, 0 );
#endif
if( ld->ld_version < LDAP_VERSION3 ) {
return ld->ld_errno;
}
- if( res->lm_msgtype != LDAP_RES_EXTENDED_PARTIAL ) {
+ if( res->lm_msgtype != LDAP_RES_INTERMEDIATE ) {
ld->ld_errno = LDAP_PARAM_ERROR;
return ld->ld_errno;
}
return LDAP_SUCCESS;
}
-#ifdef LDAP_RES_INTERMEDIATE_RESP
+#if 0
/* Parse an intermediate response result */
int
ldap_parse_intermediate_resp_result (
for ( tmp = lm; tmp != NULL; tmp = tmp->lm_chain ) {
if ( tmp->lm_msgtype != LDAP_RES_SEARCH_ENTRY
&& tmp->lm_msgtype != LDAP_RES_SEARCH_REFERENCE
- && tmp->lm_msgtype != LDAP_RES_EXTENDED_PARTIAL )
+ && tmp->lm_msgtype != LDAP_RES_INTERMEDIATE )
{
break;
}
for ( tmp = l; (tmp->lm_chain != NULL) &&
((tmp->lm_chain->lm_msgtype == LDAP_RES_SEARCH_ENTRY) ||
(tmp->lm_chain->lm_msgtype == LDAP_RES_SEARCH_REFERENCE) ||
- (tmp->lm_chain->lm_msgtype == LDAP_RES_EXTENDED_PARTIAL ));
+ (tmp->lm_chain->lm_msgtype == LDAP_RES_INTERMEDIATE ));
tmp = tmp->lm_chain )
; /* NULL */
tmp->lm_chain = new;
case LDAP_RES_COMPARE: return "compare";
case LDAP_RES_DELETE: return "delete";
case LDAP_RES_EXTENDED: return "extended-result";
- case LDAP_RES_EXTENDED_PARTIAL: return "extended-partial";
+ case LDAP_RES_INTERMEDIATE: return "intermediate";
case LDAP_RES_MODIFY: return "modify";
case LDAP_RES_RENAME: return "rename";
case LDAP_RES_SEARCH_ENTRY: return "search-entry";
return( ld->ld_errno );
}
- if( rc == LDAP_RES_SEARCH_REFERENCE || rc == LDAP_RES_EXTENDED_PARTIAL ) {
+ if( rc == LDAP_RES_SEARCH_REFERENCE || rc == LDAP_RES_INTERMEDIATE ) {
return( ld->ld_errno );
}
#include "ldap_queue.h"
#include "ldap_rq.h"
-#ifdef LDAP_SYNCREPL
-
void
ldap_pvt_runqueue_insert(
struct runqueue_s* rq,
return count;
}
-#endif
}
rs->sr_rspdata = &rspdata;
- send_ldap_intermediate_resp( op, rs );
+ send_ldap_intermediate( op, rs );
rs->sr_rspdata = NULL;
ber_free_buf( ber );
c->c_send_search_entry = slap_send_search_entry;
c->c_send_search_reference = slap_send_search_reference;
c->c_send_ldap_extended = slap_send_ldap_extended;
-#ifdef LDAP_RES_INTERMEDIATE_RESP
- c->c_send_ldap_intermediate_resp = slap_send_ldap_intermediate_resp;
+#ifdef LDAP_RES_INTERMEDIATE
+ c->c_send_ldap_intermediate = slap_send_ldap_intermediate;
#endif
c->c_authmech.bv_val = NULL;
LDAP_SLAPD_F (void) send_ldap_sasl LDAP_P(( Operation *op, SlapReply *rs ));
LDAP_SLAPD_F (void) send_ldap_disconnect LDAP_P(( Operation *op, SlapReply *rs ));
LDAP_SLAPD_F (void) slap_send_ldap_extended LDAP_P(( Operation *op, SlapReply *rs ));
-LDAP_SLAPD_F (void) slap_send_ldap_intermediate_resp LDAP_P(( Operation *op, SlapReply *rs ));
+LDAP_SLAPD_F (void) slap_send_ldap_intermediate LDAP_P(( Operation *op, SlapReply *rs ));
LDAP_SLAPD_F (void) slap_send_search_result LDAP_P(( Operation *op, SlapReply *rs ));
LDAP_SLAPD_F (int) slap_send_search_reference LDAP_P(( Operation *op, SlapReply *rs ));
LDAP_SLAPD_F (int) slap_send_search_entry LDAP_P(( Operation *op, SlapReply *rs ));
send_ldap_response( op, rs );
}
-#ifdef LDAP_RES_INTERMEDIATE_RESP
+#ifdef LDAP_RES_INTERMEDIATE
void
-slap_send_ldap_intermediate_resp( Operation *op, SlapReply *rs )
+slap_send_ldap_intermediate( Operation *op, SlapReply *rs )
{
rs->sr_type = REP_EXTENDED;
#ifdef NEW_LOGGING
rs->sr_rspoid ? rs->sr_rspoid : "",
rs->sr_rspdata != NULL ? rs->sr_rspdata->bv_len : 0 );
#endif
- rs->sr_tag = LDAP_RES_INTERMEDIATE_RESP;
+ rs->sr_tag = LDAP_RES_INTERMEDIATE;
rs->sr_msgid = op->o_msgid;
send_ldap_response( op, rs );
}
#include <ldap.h>
#include <ldap_schema.h>
+#include "lber_pvt.h"
#include "ldap_pvt_thread.h"
#include "ldap_queue.h"
struct slap_op *op, struct slap_rep *rs);
typedef void (SEND_LDAP_EXTENDED)(
struct slap_op *op, struct slap_rep *rs);
-typedef void (SEND_LDAP_INTERMEDIATE_RESP)(
+typedef void (SEND_LDAP_INTERMEDIATE)(
struct slap_op *op, struct slap_rep *rs);
#define send_ldap_result( op, rs ) \
(op->o_conn->c_send_search_reference)( op, rs )
#define send_ldap_extended( op, rs ) \
(op->o_conn->c_send_ldap_extended)( op, rs )
-#define send_ldap_intermediate_resp( op, rs ) \
- (op->o_conn->c_send_ldap_intermediate_resp)( op, rs )
+#define send_ldap_intermediate( op, rs ) \
+ (op->o_conn->c_send_ldap_intermediate)( op, rs )
/*
* Caches the result of a backend_group check for ACL evaluation
SEND_SEARCH_ENTRY *c_send_search_entry;
SEND_SEARCH_REFERENCE *c_send_search_reference;
SEND_LDAP_EXTENDED *c_send_ldap_extended;
-#ifdef LDAP_RES_INTERMEDIATE_RESP
- SEND_LDAP_INTERMEDIATE_RESP *c_send_ldap_intermediate_resp;
+#ifdef LDAP_RES_INTERMEDIATE
+ SEND_LDAP_INTERMEDIATE *c_send_ldap_intermediate;
#endif
} Connection;
}
break;
- case LDAP_RES_INTERMEDIATE_RESP:
- ldap_parse_intermediate_resp_result( ld, msg,
- &retoid, &retdata, 0 );
+ case LDAP_RES_INTERMEDIATE:
+ ldap_parse_intermediate( ld, msg, &retoid, &retdata, NULL, 0 );
if ( !strcmp( retoid, LDAP_SYNC_INFO ) ) {
sync_info_arrived = 1;
res_ber = ber_init( retdata );