]> git.sur5r.net Git - openldap/commitdiff
cleanup experimental controls: rename macros, ifdef code
authorPierangelo Masarati <ando@openldap.org>
Tue, 21 Aug 2007 21:42:09 +0000 (21:42 +0000)
committerPierangelo Masarati <ando@openldap.org>
Tue, 21 Aug 2007 21:42:09 +0000 (21:42 +0000)
servers/slapd/back-sql/delete.c
servers/slapd/controls.c
servers/slapd/slap.h

index ac0f9f62a73e193f2a4c39b0c35e652a52b3997b..c04acb0a8df522ec5ff98486bea581d66d06c37e 100644 (file)
@@ -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 );
        }
 
index 7e98665d3f56c8711c3fa68c5844caac59b653ac..c89708dbf2fc537f60d8f931caf235c8f2e335d1 100644 (file)
@@ -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,
index e71d8423fe393b9dca458a4f9184e1a45e7a6b8c..4c001956eb1f5cf4b0a3cf8e526ae19c7478e4c0 100644 (file)
@@ -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