From f708379ce23e460d8697cb544112b1849fd1c83c Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Mon, 20 Jul 2009 22:53:10 +0000
Subject: [PATCH] Follow up to fix for issue 4092 (dsreplication should allow to configure servers with no replication server and servers with only a replication server) The fix consists on not assuming that the replication server contains all the references to the other replication servers (there might be domains and no replication server on a given server).

---
 opends/src/ads/org/opends/admin/ads/ServerDescriptor.java |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/opends/src/ads/org/opends/admin/ads/ServerDescriptor.java b/opends/src/ads/org/opends/admin/ads/ServerDescriptor.java
index 190d488..0c34f65 100644
--- a/opends/src/ads/org/opends/admin/ads/ServerDescriptor.java
+++ b/opends/src/ads/org/opends/admin/ads/ServerDescriptor.java
@@ -1042,6 +1042,8 @@
     desc.serverProperties.put(ServerProperty.IS_REPLICATION_ENABLED,
         replicationEnabled ? Boolean.TRUE : Boolean.FALSE);
 
+    Set<String> allReplicationServers = new LinkedHashSet<String>();
+
     if (cacheFilter.searchBaseDNInformation())
     {
       ctls = new SearchControls();
@@ -1085,6 +1087,7 @@
                   repServers.add(s.toLowerCase());
                 }
                 replica.setReplicationServers(repServers);
+                allReplicationServers.addAll(repServers);
               }
             }
           }
@@ -1134,8 +1137,9 @@
         {
           repServers.add(s.toLowerCase());
         }
+        allReplicationServers.addAll(repServers);
         desc.serverProperties.put(ServerProperty.EXTERNAL_REPLICATION_SERVERS,
-            repServers);
+            allReplicationServers);
       }
     }
     catch (NameNotFoundException nse)

--
Gitblit v1.10.0