+/* $OpenLDAP$ */
/*
* Copyright (c) 1996 Regents of the University of Michigan.
* All rights reserved.
#define LDAP_SYSLOG 1
#endif
-#include <ac/syslog.h>
#include <ac/errno.h>
+#include <ac/signal.h>
+#include <ac/syslog.h>
+#include <ac/time.h>
+#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
+#endif
+#include <sys/types.h>
+
+#include <ldap.h>
-#include "lber.h"
-#include "ldap.h"
+#undef ldap_debug
+#define ldap_debug slurp_debug
#include "ldap_log.h"
-#include "lthread.h"
-#include "ldapconfig.h"
+#include "ldap_pvt_thread.h"
+#include "ldap_defaults.h"
#include "ldif.h"
#define T_DELETECTSTR "delete"
#define T_DELETECT 6
#define T_MODRDNCTSTR "modrdn"
+#define T_MODDNCTSTR "moddn"
+#define T_RENAMECTSTR "rename"
#define T_MODRDNCT 7
#define T_MODOPADDSTR "add"
#define T_MODSEP 11
#define T_NEWRDNSTR "newrdn"
-#define T_DRDNFLAGSTR "deleteoldrdn"
+#define T_DELOLDRDNSTR "deleteoldrdn"
+#define T_NEWSUPSTR "newsuperior"
#define T_ERR -1
struct stel *ri_stel; /* pointer to Stel for this replica */
unsigned long
ri_seq; /* seq number of last repl */
- pthread_t ri_tid; /* ID of thread for this replica */
+ ldap_pvt_thread_t ri_tid; /* ID of thread for this replica */
/* Member functions */
int (*ri_process) LDAP_P(( Ri * )); /* process the next repl entry */
struct re {
/* Private data */
- pthread_mutex_t
+ ldap_pvt_thread_mutex_t
re_mutex; /* mutex for this Re */
int re_refcnt; /* ref count, 0 = done */
char *re_timestamp; /* timestamp of this re */
time_t rq_lasttrim; /* Last time we trimmed file */
/* Public data */
- pthread_mutex_t
+ ldap_pvt_thread_mutex_t
rq_mutex; /* mutex for whole queue */
- pthread_cond_t
+ ldap_pvt_thread_cond_t
rq_more; /* condition var - more work added */
/* Member functions */
typedef struct st St;
struct st {
/* Private data */
- pthread_mutex_t
+ ldap_pvt_thread_mutex_t
st_mutex; /* mutex to serialize access */
Stel **st_data; /* array of pointers to Stel structs */
int st_nreplicas; /* number of repl hosts */