]> git.sur5r.net Git - openldap/commitdiff
Delete obsolete syncprovider stuff
authorHoward Chu <hyc@openldap.org>
Fri, 14 Jan 2005 05:19:51 +0000 (05:19 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 14 Jan 2005 05:19:51 +0000 (05:19 +0000)
servers/slapd/Makefile.in
servers/slapd/connection.c
servers/slapd/controls.c
servers/slapd/operation.c
servers/slapd/search.c
servers/slapd/sessionlog.c [deleted file]
servers/slapd/slap.h

index 8af3d0819957ef221ccc0253f2eb621fc61e0df4..213f81667309d96af337b43daa53386bb7ca9e01 100644 (file)
@@ -35,7 +35,7 @@ SRCS  = main.c globals.c config.c daemon.c \
                oidm.c starttls.c index.c sets.c referral.c root_dse.c \
                sasl.c module.c mra.c mods.c sl_malloc.c zn_malloc.c limits.c \
                operational.c matchedValues.c cancel.c syncrepl.c \
-               backover.c ctxcsn.c ldapsync.c sessionlog.c frontend.c \
+               backover.c ctxcsn.c ldapsync.c frontend.c \
                slapadd.c slapcat.c slapcommon.c slapdn.c slapindex.c \
                slappasswd.c slaptest.c slapauth.c slapacl.c component.c \
                $(@PLAT@_SRCS)
@@ -52,7 +52,7 @@ OBJS  = main.o globals.o config.o daemon.o \
                oidm.o starttls.o index.o sets.o referral.o root_dse.o \
                sasl.o module.o mra.o mods.o sl_malloc.o zn_malloc.o limits.o \
                operational.o matchedValues.o cancel.o syncrepl.o \
-               backover.o ctxcsn.o ldapsync.o sessionlog.o frontend.o \
+               backover.o ctxcsn.o ldapsync.o frontend.o \
                slapadd.o slapcat.o slapcommon.o slapdn.o slapindex.o \
                slappasswd.o slaptest.o slapauth.o slapacl.o component.o \
                $(@PLAT@_OBJS)
index 674b04de85a313ebc5c80177c287c3a218f6f697..d59d403e7a09126e192d283251cbe8cc7965e3e6 100644 (file)
@@ -1061,27 +1061,11 @@ operations_error:
 
        ber_set_option( op->o_ber, LBER_OPT_BER_MEMCTX, &memctx_null );
 
-#if 0  /* DELETE ME */
-       if ( op->o_cancel != SLAP_CANCEL_ACK &&
-               ( op->o_sync_mode & SLAP_SYNC_PERSIST ) )
-       {
-               slap_sl_mem_detach( ctx, memctx );
-       } else if ( op->o_sync_slog_size != -1 ) {
-               slap_sl_mem_detach( ctx, memctx );
-               LDAP_STAILQ_REMOVE( &conn->c_ops, op, slap_op, o_next);
-               LDAP_STAILQ_NEXT(op, o_next) = NULL;
-               conn->c_n_ops_executing--;
-               conn->c_n_ops_completed++;
-
-       } else
-#endif
-       {
-               LDAP_STAILQ_REMOVE( &conn->c_ops, op, slap_op, o_next);
-               LDAP_STAILQ_NEXT(op, o_next) = NULL;
-               slap_op_free( op );
-               conn->c_n_ops_executing--;
-               conn->c_n_ops_completed++;
-       }
+       LDAP_STAILQ_REMOVE( &conn->c_ops, op, slap_op, o_next);
+       LDAP_STAILQ_NEXT(op, o_next) = NULL;
+       slap_op_free( op );
+       conn->c_n_ops_executing--;
+       conn->c_n_ops_completed++;
 
        switch( tag ) {
        case LBER_ERROR:
index 34cf6cf731942e1030b12ff47f6f1bd5e7dede72..c7f88901eaca2a9ecc2ce1bfe3564c557ae3ab16 100644 (file)
@@ -830,13 +830,6 @@ static int parsePagedResults (
                return LDAP_PROTOCOL_ERROR;
        }
 
-#if 0  /* DELETE ME */
-       if ( op->o_sync != SLAP_CONTROL_NONE ) {
-               rs->sr_text = "paged results control specified with sync control";
-               return LDAP_PROTOCOL_ERROR;
-       }
-#endif
-
        if ( BER_BVISEMPTY( &ctrl->ldctl_value ) ) {
                rs->sr_text = "paged results control value is empty (or absent)";
                return LDAP_PROTOCOL_ERROR;
index 03b0e7df3fdf8ecb14b63b1deeaa34a91ced89d6..e65fd4d7ad9c5e3dd3411d26128e7ce6cdf23077 100644 (file)
@@ -108,16 +108,6 @@ slap_op_free( Operation *op )
        op->o_hdr = (Opheader *)(op+1);
        op->o_controls = (void **)(op->o_hdr+1);
 
-#if 0  /* DELETE ME */
-       slap_sync_cookie_free( &op->o_sync_state, 0 );
-       if ( op->o_sync_csn.bv_val != NULL ) {
-               ch_free( op->o_sync_csn.bv_val );
-       }
-       op->o_sync_state.sid = -1;
-       op->o_sync_slog_size = -1;
-       op->o_sync_state.rid = -1;
-#endif
-
        ldap_pvt_thread_mutex_lock( &slap_op_mutex );
        LDAP_STAILQ_INSERT_HEAD( &slap_free_ops, op, o_next );
        ldap_pvt_thread_mutex_unlock( &slap_op_mutex );
@@ -155,14 +145,6 @@ slap_op_alloc(
        op->o_opid = id;
        op->o_res_ber = NULL;
 
-#if 0  /* DELETE ME */
-       op->o_sync_state.sid = -1;
-       op->o_sync_slog_size = -1;
-       op->o_sync_state.rid = -1;
-       LDAP_STAILQ_FIRST( &op->o_sync_slog_list ) = NULL;
-       op->o_sync_slog_list.stqh_last = &LDAP_STAILQ_FIRST( &op->o_sync_slog_list );
-#endif
-
 #if defined( LDAP_SLAPI )
        if ( slapi_plugins_used ) {
                op->o_pb = slapi_pblock_new();
index 5da8472fa95b8ccea3df202fff13d4bc73d49d88..283fb6dfcf4bd8e67eb30dff64d8468db4b639e6 100644 (file)
@@ -223,14 +223,6 @@ do_search(
        rs->sr_err = frontendDB->be_search( op, rs );
 
 return_results:;
-#if 0  /* DELETE ME */
-       if ( ( op->o_sync_mode & SLAP_SYNC_PERSIST ) ) {
-               return rs->sr_err;
-       }
-       if ( ( op->o_sync_slog_size != -1 ) ) {
-               return rs->sr_err;
-       }
-#endif
        if ( !BER_BVISNULL( &op->o_req_dn ) ) {
                slap_sl_free( op->o_req_dn.bv_val, op->o_tmpmemctx );
        }
@@ -352,21 +344,7 @@ fe_op_search( Operation *op, SlapReply *rs )
         * if we don't hold it.
         */
 
-#if 0  /* DELETE ME */
-       /* Sync control overrides manageDSAit */
-
-       if ( manageDSAit != SLAP_CONTROL_NONE ) {
-               if ( op->o_sync_mode & SLAP_SYNC_REFRESH ) {
-                       be_manageDSAit = SLAP_CONTROL_NONE;
-               } else {
-                       be_manageDSAit = manageDSAit;
-               }
-       } else {
-               be_manageDSAit = manageDSAit;
-       }
-#else
-               be_manageDSAit = manageDSAit;
-#endif
+       be_manageDSAit = manageDSAit;
 
        op->o_bd = select_backend( &op->o_req_ndn, be_manageDSAit, 1 );
        if ( op->o_bd == NULL ) {
diff --git a/servers/slapd/sessionlog.c b/servers/slapd/sessionlog.c
deleted file mode 100644 (file)
index d8cc5f6..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-/* sessionlog.c -- Session History Management Routines */
-/* $OpenLDAP$ */
-/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
- *
- * Copyright 2003-2005 The OpenLDAP Foundation.
- * Portions Copyright 2003 IBM Corporation.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted only as authorized by the OpenLDAP
- * Public License.
- *
- * A copy of this license is available in the file LICENSE in the
- * top-level directory of the distribution or, alternatively, at
- * <http://www.OpenLDAP.org/license.html>.
- */
-
-#include "portable.h"
-
-#include <stdio.h>
-
-#include <ac/string.h>
-#include <ac/socket.h>
-
-#include "lutil.h"
-#include "slap.h"
-#include "lutil_ldap.h"
-
-#if 0  /* DELETE ME -- needs to be reimplemented with syncprov overlay */
-int
-slap_send_session_log(
-       Operation *op,
-       Operation *sop,
-       SlapReply *rs
-)
-{
-       Entry e;
-       AttributeName   uuid_attr[2];
-       LDAPControl *ctrls[SLAP_MAX_RESPONSE_CONTROLS];
-       int             num_ctrls = 0;
-       struct slog_entry *slog_e;
-       int             result;
-       int             match;
-       const   char    *text;
-
-       uuid_attr[0].an_desc = NULL;
-       uuid_attr[0].an_oc = NULL;
-       uuid_attr[0].an_oc_exclude = 0;
-       uuid_attr[0].an_name.bv_len = 0;
-       uuid_attr[0].an_name.bv_val = NULL;
-       e.e_attrs = NULL;
-       e.e_id = 0;
-       e.e_name.bv_val = NULL;
-       e.e_name.bv_len = 0;
-       e.e_nname.bv_val = NULL;
-       e.e_nname.bv_len = 0;
-
-       for( num_ctrls = 0;
-                num_ctrls < SLAP_MAX_RESPONSE_CONTROLS;
-                num_ctrls++ ) {
-               ctrls[num_ctrls] = NULL;
-       }
-       num_ctrls = 0;
-
-       LDAP_STAILQ_FOREACH( slog_e, &sop->o_sync_slog_list, sl_link ) {
-
-               if ( op->o_sync_state.ctxcsn->bv_val == NULL ) {
-                       match = 1;
-               } else {
-                       value_match( &match, slap_schema.si_ad_entryCSN,
-                                               slap_schema.si_ad_entryCSN->ad_type->sat_ordering,
-                                               SLAP_MR_VALUE_OF_ATTRIBUTE_SYNTAX,
-                                               op->o_sync_state.ctxcsn, &slog_e->sl_csn, &text );
-               }
-
-               if ( match < 0 ) {
-                       rs->sr_err = slap_build_sync_state_ctrl_from_slog( op, rs, slog_e,
-                                                       LDAP_SYNC_DELETE, ctrls, num_ctrls++, 0, NULL );
-
-                       if ( rs->sr_err != LDAP_SUCCESS )
-                               return rs->sr_err;
-
-                       if ( e.e_name.bv_val )
-                               ch_free( e.e_name.bv_val );
-                       ber_dupbv( &e.e_name, &slog_e->sl_name );
-
-                       rs->sr_entry = &e;
-                       rs->sr_attrs = uuid_attr;
-                       rs->sr_ctrls = ctrls;
-                       rs->sr_flags = 0;
-                       result = send_search_entry( op, rs );
-                       slap_sl_free( ctrls[num_ctrls-1]->ldctl_value.bv_val, op->o_tmpmemctx );
-                       slap_sl_free( ctrls[--num_ctrls], op->o_tmpmemctx );
-                       ctrls[num_ctrls] = NULL;
-                       rs->sr_ctrls = NULL;
-               }
-       }
-       return LDAP_SUCCESS;
-}
-
-int
-slap_add_session_log(
-       Operation *op,
-       Operation *sop,
-       Entry *e
-)
-{
-       struct slog_entry* slog_e;
-       Attribute *a;
-
-       slog_e = (struct slog_entry *) ch_calloc (1, sizeof( struct slog_entry ));
-       a = attr_find( e->e_attrs, slap_schema.si_ad_entryUUID );
-       ber_dupbv( &slog_e->sl_uuid, &a->a_nvals[0] );
-       ber_dupbv( &slog_e->sl_name, &e->e_name );
-       ber_dupbv( &slog_e->sl_csn,  &op->o_sync_csn );
-       LDAP_STAILQ_INSERT_TAIL( &sop->o_sync_slog_list, slog_e, sl_link );
-       sop->o_sync_slog_len++;
-
-       while ( sop->o_sync_slog_len > sop->o_sync_slog_size ) {
-               slog_e = LDAP_STAILQ_FIRST( &sop->o_sync_slog_list );
-               if ( sop->o_sync_slog_omitcsn.bv_val ) {
-                       ch_free( sop->o_sync_slog_omitcsn.bv_val );
-               }
-               ber_dupbv( &sop->o_sync_slog_omitcsn, &slog_e->sl_csn );
-               LDAP_STAILQ_REMOVE_HEAD( &sop->o_sync_slog_list, sl_link );
-               ch_free( slog_e->sl_uuid.bv_val );
-               ch_free( slog_e->sl_name.bv_val );
-               ch_free( slog_e->sl_csn.bv_val );
-               ch_free( slog_e );
-               sop->o_sync_slog_len--;
-       }
-
-       return LDAP_SUCCESS;
-}
-#endif
index a25e6945b01fbd52843d927ba001ab9bc955cf43..c7ae76acd5baf8ed84fac4100df540dc317d91bc 100644 (file)
@@ -2068,35 +2068,6 @@ typedef struct slap_paged_state {
        int ps_count;
 } PagedResultsState;
 
-#define LDAP_PSEARCH_BY_ADD                    0x01
-#define LDAP_PSEARCH_BY_DELETE         0x02
-#define LDAP_PSEARCH_BY_PREMODIFY      0x03
-#define LDAP_PSEARCH_BY_MODIFY         0x04
-#define LDAP_PSEARCH_BY_SCOPEOUT       0x05
-#define LDAP_PSEARCH_BY_PREDELETE      0x06
-
-struct psid_entry {            /* DELETE ME */
-       struct slap_op *ps_op;
-       LDAP_LIST_ENTRY(psid_entry) ps_link;
-};
-
-#if 0  /* DELETE ME */
-struct slog_entry {
-       struct berval sl_uuid;
-       struct berval sl_name;
-       struct berval sl_csn;
-       LDAP_STAILQ_ENTRY(slog_entry) sl_link;
-};
-
-/* session lists */
-struct slap_session_entry {
-       int se_id;
-       int se_size;
-       struct berval se_spec;
-       LDAP_LIST_ENTRY( slap_session_entry ) se_link;
-};
-#endif
-
 struct slap_csn_entry {
        struct berval ce_csn;
        unsigned long ce_opid;
@@ -2107,16 +2078,6 @@ struct slap_csn_entry {
        LDAP_TAILQ_ENTRY (slap_csn_entry) ce_csn_link;
 };
 
-struct pc_entry {
-       ID pc_id;
-       int pc_sent;
-       struct berval pc_csn;
-       struct berval pc_entryUUID;
-       struct berval pc_ename;
-       struct berval pc_enname;
-       LDAP_TAILQ_ENTRY( pc_entry ) pc_link;
-};
-
 /*
  * Caches the result of a backend_group check for ACL evaluation
  */
@@ -2353,29 +2314,6 @@ typedef struct slap_op {
 
 #define get_pagedresults(op)                   ((int)(op)->o_pagedresults)
 
-#ifdef BDB_PSEARCH
-       struct sync_cookie      o_sync_state;
-       int                                     o_sync_rhint;
-       struct berval           o_sync_cid;
-       int                                     o_sync_slog_size;
-       struct berval           o_sync_csn;
-       struct berval           o_sync_slog_omitcsn;
-       int                                     o_sync_slog_len;
-       LDAP_STAILQ_HEAD(sl, slog_entry) o_sync_slog_list;
-
-       int o_ps_entries;
-       int     o_no_psearch;
-       LDAP_LIST_ENTRY(slap_op) o_ps_link;
-       LDAP_LIST_HEAD(pe, psid_entry) o_pm_list;
-
-       int o_refresh_in_progress;
-       LDAP_TAILQ_HEAD(pc_pre, pc_entry) o_ps_pre_candidates;
-       LDAP_TAILQ_HEAD(pc_post, pc_entry) o_ps_post_candidates;
-       Avlnode *o_psearch_finished;
-       struct pc_entry *o_ps_send_wait;
-       ldap_pvt_thread_mutex_t o_pcmutex;
-#endif
-
        AuthorizationInformation o_authz;
 
        BerElement      *o_ber;         /* ber of the request */