Hi Thuan,
See my comment inline.

B.R
/Thang

-----Original Message-----
From: Tran Thuan <thuan.t...@dektech.com.au> 
Sent: Monday, February 25, 2019 11:20 AM
To: 'thang.d.nguyen' <thang.d.ngu...@dektech.com.au>;
lennart.l...@ericsson.com; thua...@users.sourceforge.net
Cc: opensaf-devel@lists.sourceforge.net
Subject: RE: [devel] [PATCH 1/1] smf: clear old attributes before re-filling
if ccb abort to sync [#3010]

Hi Thang,

See one comment inline [Thuan]

Best Regards,
ThuanTr

-----Original Message-----
From: thang.d.nguyen <thang.d.ngu...@dektech.com.au>
Sent: Monday, February 25, 2019 11:04 AM
To: lennart.l...@ericsson.com; thua...@users.sourceforge.net
Cc: opensaf-devel@lists.sourceforge.net
Subject: [devel] [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 must be erased before re-filling.
---
 src/smf/smfd/SmfImmOperation.h | 5 +++++
 src/smf/smfd/SmfUtils.cc       | 3 +++
 2 files changed, 8 insertions(+)

diff --git a/src/smf/smfd/SmfImmOperation.h b/src/smf/smfd/SmfImmOperation.h
index bc91431..c2c1be3 100644
--- a/src/smf/smfd/SmfImmOperation.h
+++ b/src/smf/smfd/SmfImmOperation.h
@@ -113,6 +113,11 @@ class SmfImmOperation {
     LOG_NO("addValue must be specialised");
   }
 
+  // Delete all attribute of object_create_  void DeleteAttributes() {
+    object_create_.attributes.clear();
[Thuan] I think we need check "imm_operation_" is "Create" to do
"object_create_.attributes.clear();"
[Thang]: I will update in next version. 
+  }
+
   // 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..dfe9953 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 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
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel




_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to