mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
cleanup experimental controls: rename macros, ifdef code
This commit is contained in:
parent
b21a1ce71c
commit
6270bd9e82
@ -499,10 +499,12 @@ backsql_delete( Operation *op, SlapReply *rs )
|
||||
break;
|
||||
|
||||
case LDAP_COMPARE_TRUE:
|
||||
#ifdef SLAP_CONTROL_X_TREE_DELETE
|
||||
if ( get_treeDelete( op ) ) {
|
||||
rs->sr_err = LDAP_SUCCESS;
|
||||
break;
|
||||
}
|
||||
#endif /* SLAP_CONTROL_X_TREE_DELETE */
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE, " backsql_delete(): "
|
||||
"entry \"%s\" has children\n",
|
||||
@ -567,6 +569,7 @@ backsql_delete( Operation *op, SlapReply *rs )
|
||||
}
|
||||
|
||||
e = &d;
|
||||
#ifdef SLAP_CONTROL_X_TREE_DELETE
|
||||
if ( get_treeDelete( op ) ) {
|
||||
backsql_tree_delete( op, rs, dbh, &sth );
|
||||
if ( rs->sr_err == LDAP_OTHER || rs->sr_err == LDAP_SUCCESS )
|
||||
@ -574,7 +577,9 @@ backsql_delete( Operation *op, SlapReply *rs )
|
||||
e = NULL;
|
||||
}
|
||||
|
||||
} else {
|
||||
} else
|
||||
#endif /* SLAP_CONTROL_X_TREE_DELETE */
|
||||
{
|
||||
backsql_delete_int( op, rs, dbh, &sth, &e_id, &e );
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ static SLAP_CTRL_PARSE_FN parsePreRead, parsePostRead;
|
||||
static SLAP_CTRL_PARSE_FN parseProxyAuthz;
|
||||
static SLAP_CTRL_PARSE_FN parseRelax;
|
||||
static SLAP_CTRL_PARSE_FN parseSearchOptions;
|
||||
#ifdef SLAP_SORTEDRESULTS
|
||||
#ifdef SLAP_CONTROL_X_SORTEDRESULTS
|
||||
static SLAP_CTRL_PARSE_FN parseSortedResults;
|
||||
#endif
|
||||
static SLAP_CTRL_PARSE_FN parseSubentries;
|
||||
@ -130,7 +130,7 @@ static struct slap_control control_defs[] = {
|
||||
SLAP_CTRL_SEARCH,
|
||||
NULL, NULL,
|
||||
parsePagedResults, LDAP_SLIST_ENTRY_INITIALIZER(next) },
|
||||
#ifdef SLAP_SORTEDRESULTS
|
||||
#ifdef SLAP_CONTROL_X_SORTEDRESULTS
|
||||
{ LDAP_CONTROL_SORTREQUEST,
|
||||
(int)offsetof(struct slap_control_ids, sc_sortedResults),
|
||||
SLAP_CTRL_GLOBAL|SLAP_CTRL_SEARCH|SLAP_CTRL_HIDE,
|
||||
@ -1109,7 +1109,7 @@ done:;
|
||||
return rc;
|
||||
}
|
||||
|
||||
#ifdef SLAP_SORTEDRESULTS
|
||||
#ifdef SLAP_CONTROL_X_SORTEDRESULTS
|
||||
static int parseSortedResults (
|
||||
Operation *op,
|
||||
SlapReply *rs,
|
||||
|
@ -64,7 +64,7 @@ LDAP_BEGIN_DECL
|
||||
#define LDAP_COLLECTIVE_ATTRIBUTES
|
||||
#define LDAP_COMP_MATCH
|
||||
#define LDAP_SYNC_TIMESTAMP
|
||||
#define SLAP_SORTEDRESULTS
|
||||
#define SLAP_CONTROL_X_SORTEDRESULTS
|
||||
#endif
|
||||
|
||||
#define LDAP_DYNAMIC_OBJECTS
|
||||
@ -2347,11 +2347,13 @@ struct slap_control_ids {
|
||||
int sc_proxyAuthz;
|
||||
int sc_relax;
|
||||
int sc_searchOptions;
|
||||
#ifdef SLAP_SORTEDRESULTS
|
||||
#ifdef SLAP_CONTROL_X_SORTEDRESULTS
|
||||
int sc_sortedResults;
|
||||
#endif
|
||||
int sc_subentries;
|
||||
#ifdef SLAP_CONTROL_X_TREE_DELETE
|
||||
int sc_treeDelete;
|
||||
#endif
|
||||
#ifdef LDAP_X_TXN
|
||||
int sc_txnSpec;
|
||||
#endif
|
||||
@ -2546,8 +2548,10 @@ struct Operation {
|
||||
#define o_domain_scope o_ctrlflag[slap_cids.sc_domainScope]
|
||||
#define get_domainScope(op) ((int)(op)->o_domain_scope)
|
||||
|
||||
#ifdef SLAP_CONTROL_X_TREE_DELETE
|
||||
#define o_tree_delete o_ctrlflag[slap_cids.sc_treeDelete]
|
||||
#define get_treeDelete(op) ((int)(op)->o_tree_delete)
|
||||
#endif
|
||||
|
||||
#define o_preread o_ctrlflag[slap_cids.sc_preRead]
|
||||
#define o_postread o_ctrlflag[slap_cids.sc_postRead]
|
||||
@ -2559,7 +2563,7 @@ struct Operation {
|
||||
#define o_pagedresults_state o_controls[slap_cids.sc_pagedResults]
|
||||
#define get_pagedresults(op) ((int)(op)->o_pagedresults)
|
||||
|
||||
#ifdef SLAP_SORTEDRESULTS
|
||||
#ifdef SLAP_CONTROL_X_SORTEDRESULTS
|
||||
#define o_sortedresults o_ctrlflag[slap_cids.sc_sortedResults]
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user