]> git.sur5r.net Git - openldap/blobdiff - servers/slurpd/reject.c
Fix modlist bug in last commit
[openldap] / servers / slurpd / reject.c
index b87f55145a9a9df1315f240940546f40315df502..643799268e3ce2fcdb895749fa6c7e3f07a0cc51 100644 (file)
  * to a replica LDAP server.
  */
 
-#define DISABLE_BRIDGE
 #include "portable.h"
 
 #include <stdio.h>
-#include <sys/types.h>
+
+#include <ac/errno.h>
+#include <ac/unistd.h>
+
 #include <sys/stat.h>
 #include <fcntl.h>
-#include <unistd.h>
 
 #include "slurp.h"
 #include "globals.h"
 
-#ifndef DECL_SYS_ERRLIST
-extern char *sys_errlist[];
-#endif /* DECL_SYS_ERRLIST */
-
-
 /*
  * Write a replication record to a reject file.  The reject file has the
  * same name as the replica's private copy of the file but with ".rej"
@@ -54,7 +50,7 @@ write_reject(
     FILE       *rfp, *lfp;
     int                rc;
 
-    pthread_mutex_lock( &sglob->rej_mutex );
+    ldap_pvt_thread_mutex_lock( &sglob->rej_mutex );
     sprintf( rejfile, "%s/%s:%d.rej", sglob->slurpd_rdir,
            ri->ri_hostname, ri->ri_port );
 
@@ -66,7 +62,7 @@ write_reject(
            Debug( LDAP_DEBUG_ANY,
                "Error: write_reject: Cannot create \"%s\": %s\n",
                rejfile, sys_errlist[ errno ], 0 );
-           pthread_mutex_unlock( &sglob->rej_mutex );
+           ldap_pvt_thread_mutex_unlock( &sglob->rej_mutex );
            return;
        } else {
            close( rjfd );
@@ -92,7 +88,7 @@ write_reject(
                "Error: ldap operation failed, data written to \"%s\"\n",
                rejfile, 0, 0 );
     }
-    pthread_mutex_unlock( &sglob->rej_mutex );
+    ldap_pvt_thread_mutex_unlock( &sglob->rej_mutex );
     return;
 }