Hi Thuan,
I correct my comment.

B.R
/Thang

-----Original Message-----
From: Thang Nguyen <[email protected]> 
Sent: Monday, February 25, 2019 11:31 AM
To: 'Tran Thuan' <[email protected]>; '[email protected]'
<[email protected]>; '[email protected]'
<[email protected]>
Cc: '[email protected]'
<[email protected]>
Subject: RE: [devel] [PATCH 1/1] smf: clear old attributes before re-filling
if ccb abort to sync [#3010]

Hi Thuan,
See my comment inline.


B.R
/Thang

-----Original Message-----
From: Tran Thuan <[email protected]> 
Sent: Monday, February 25, 2019 11:20 AM
To: 'thang.d.nguyen' <[email protected]>;
[email protected]; [email protected]
Cc: [email protected]
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 <[email protected]>
Sent: Monday, February 25, 2019 11:04 AM
To: [email protected]; [email protected]
Cc: [email protected]
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]: No need b/c it is only for create. In this case, attributes of
modificaiton also need to clear.
I will update in next PS.
+  }
+
   // 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel




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

Reply via email to