Hi Thang

Ack.

Thanks
Lennart

-----Original Message-----
From: thang.d.nguyen <[email protected]> 
Sent: den 25 februari 2019 07:25
To: Lennart Lund <[email protected]>; Thuan Tran 
<[email protected]>
Cc: [email protected]; Thang Duc Nguyen 
<[email protected]>
Subject: [PATCH 1/1] smf: clear old attributes before re-filling if ccb abort 
to sync [#3010]

During single step install, the ccb is aborted to sync. The old attributes in 
object creator/modifier must be erased before re-filling.
---
 src/smf/smfd/SmfImmOperation.h | 6 ++++++
 src/smf/smfd/SmfUtils.cc       | 3 +++
 2 files changed, 9 insertions(+)

diff --git a/src/smf/smfd/SmfImmOperation.h b/src/smf/smfd/SmfImmOperation.h 
index bc91431..04b4455 100644
--- a/src/smf/smfd/SmfImmOperation.h
+++ b/src/smf/smfd/SmfImmOperation.h
@@ -113,6 +113,12 @@ class SmfImmOperation {
     LOG_NO("addValue must be specialised");
   }
 
+  // Delete all attribute of object_create_ or object_modify_  void 
+ DeleteAttributes() {
+    object_create_.attributes.clear();
+    object_modify_.modifications.clear();
+  }
+
   // Create and add a new attribute if the attribute does not already
   // exist (based on name). If an attribute with the given name already exist
   // no attribute is created but the value (i_value) is added (multivalue).
diff --git a/src/smf/smfd/SmfUtils.cc b/src/smf/smfd/SmfUtils.cc index 
c2931c8..882a3e6 100644
--- a/src/smf/smfd/SmfUtils.cc
+++ b/src/smf/smfd/SmfUtils.cc
@@ -698,6 +698,9 @@ SaAisErrorT SmfImmUtils::doImmOperations(
       }
     }
 
+    // Delete all attributes in the create/modify descriptor before fill
+    imm_operation->DeleteAttributes();
+
     // Verify the create descriptor for this operation and fill in the
     // attributes
     result = imm_operation->Execute(rollbackData);
--
2.7.4



_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to