]> git.sur5r.net Git - openldap/blobdiff - servers/slurpd/reject.c
ITS#2580 - avoid cache deadlock
[openldap] / servers / slurpd / reject.c
index 62a4df4f968aedf4ee62dfc654346e501baad8b1..0b4d5ee12e04f1de9d7c49cebc909464f0cc6baf 100644 (file)
 #include "slurp.h"
 #include "globals.h"
 
+#ifdef _WIN32
+#define        PORTSEP ","
+#else
+#define        PORTSEP ":"
+#endif
+
 /*
  * 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"
@@ -57,7 +63,7 @@ write_reject(
     int                rc;
 
     ldap_pvt_thread_mutex_lock( &sglob->rej_mutex );
-    snprintf( rejfile, sizeof rejfile, "%s" LDAP_DIRSEP "%s:%d.rej",
+    snprintf( rejfile, sizeof rejfile, "%s" LDAP_DIRSEP "%s" PORTSEP "%d.rej",
                sglob->slurpd_rdir, ri->ri_hostname, ri->ri_port );
 
     if ( access( rejfile, F_OK ) < 0 ) {