From b48ce50fdf4d73e8be3799e3a7c6c2bf9d1b2965 Mon Sep 17 00:00:00 2001
From: pgamba <pgamba@localhost>
Date: Sun, 02 Sep 2007 17:58:07 +0000
Subject: [PATCH] fix for #1733 & #845 - Initialization of replication

---
 opends/src/server/org/opends/server/backends/SchemaBackend.java |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/opends/src/server/org/opends/server/backends/SchemaBackend.java b/opends/src/server/org/opends/server/backends/SchemaBackend.java
index fab9a47..f4b8e02 100644
--- a/opends/src/server/org/opends/server/backends/SchemaBackend.java
+++ b/opends/src/server/org/opends/server/backends/SchemaBackend.java
@@ -171,6 +171,10 @@
   // The attribute type that will be used to save the synchronization state.
   private AttributeType synchronizationStateType;
 
+  // The attribute type that will be used to save the synchronization
+  // generationId.
+  private AttributeType synchronizationGenerationIdType;
+
   // The value containing DN of the user we'll say created the configuration.
   private AttributeValue creatorsName;
 
@@ -264,6 +268,9 @@
     nameFormsType = DirectoryServer.getAttributeType(ATTR_NAME_FORMS_LC, true);
     synchronizationStateType =
       DirectoryServer.getAttributeType(ATTR_SYNCHRONIZATION_STATE_LC, true);
+    synchronizationGenerationIdType =
+      DirectoryServer.getAttributeType(ATTR_SYNCHRONIZATION_GENERATIONID_LC,
+          true);
 
 
     // Initialize the lastmod attributes.
@@ -912,6 +919,14 @@
     attrList.add(attr);
     operationalAttrs.put(synchronizationStateType, attrList);
 
+    //  Add the synchronization GenerationId attribute.
+    valueSet = DirectoryServer.getSchema().getSynchronizationGenerationId();
+    attr = new Attribute(synchronizationGenerationIdType,
+                         ATTR_SYNCHRONIZATION_GENERATIONID_LC, valueSet);
+    attrList = new ArrayList<Attribute>(1);
+    attrList.add(attr);
+    operationalAttrs.put(synchronizationGenerationIdType, attrList);
+
     // Add all the user-defined attributes.
     for (Attribute a : userDefinedAttributes)
     {

--
Gitblit v1.10.0