]> git.sur5r.net Git - openldap/blobdiff - servers/slurpd/slurp.h
ITS#2580 - avoid cache deadlock
[openldap] / servers / slurpd / slurp.h
index 9a8c8f3bb8030fa1b8c7a8c62cf765be8d99536e..43f310dc623d0c0cf0274160840de94716264a49 100644 (file)
@@ -1,6 +1,6 @@
 /* $OpenLDAP$ */
 /*
- * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
 /*
@@ -20,7 +20,7 @@
 #ifndef _SLURPD_H_
 #define _SLURPD_H_
 
-#ifndef LDAP_SYSLOG
+#if !defined(HAVE_WINSOCK) && !defined(LDAP_SYSLOG)
 #define LDAP_SYSLOG 1
 #endif
 
 #include "ldap_defaults.h"
 #include "ldif.h"
 
+#ifdef HAVE_WINSOCK
+#define ftruncate(a,b) _chsize(a,b)
+#define truncate(a,b) _lclose( _lcreat(a, 0))
+#define S_IRGRP 0
+#define S_IWGRP 0
+#endif
+
+#undef SERVICE_NAME
+#define SERVICE_NAME   OPENLDAP_PACKAGE "-slurpd"
 
 /* Default directory for slurpd's private copy of replication logs */
 #define        DEFAULT_SLURPD_REPLICA_DIR      LDAP_RUNDIR LDAP_DIRSEP "openldap-slurp"
 
 /* Config file keywords */
 #define        HOSTSTR                 "host"
+#define        ATTRSTR                 "attr"
+#define        SUFFIXSTR               "suffix"
 #define        BINDDNSTR               "binddn"
 #define        BINDMETHSTR             "bindmethod"
 #define        KERBEROSSTR             "kerberos"
@@ -254,7 +265,7 @@ struct re {
     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     re_timestamp;           /* timestamp of this re */
     int                re_seq;                 /* sequence number */
     Rh         *re_replicas;           /* array of replica info */
     char       *re_dn;                 /* dn of entry being modified */
@@ -324,7 +335,7 @@ struct rq {
 typedef struct stel {
     char       *hostname;              /* host name of replica */
     int                port;                   /* port number of replica */
-    char       last[ 64 ];             /* timestamp of last successful repl */
+    time_t     last;                   /* timestamp of last successful repl */
     int                seq;                    /* Sequence number of last repl */
 } Stel;