Hi Lennart,

I've reviewed and tested your patch.
- For the code review, please check comments in the attached diff file.
- For the testing, a core dump occurred when executing *test_ccbhdl* (always reproducible). Test printouts, core dump backtrace, and syslog as shown below. Looks like some issue with setting an extended-name attribute of type SA_IMM_ATTR_SANAMET. Has this test passed in your last run?

-----Terminal printouts-----
root@SC-1:~# test_ccbhdl
ccbhdl_test
IMM class used for test: ImmTestValuesConfig
Creating: Test1=1,safApp=safSmfService
Aborted (core dumped)

-----System logs-----
2018-05-31 16:02:35.873 SC-1 osafimmpbed: IN Create of class ImmTestValuesConfig committing with ccbId:100000004 2018-05-31 16:02:35.889 SC-1 osafimmnd[207]: NO Create of class ImmTestValuesConfig is PERSISTENT. 2018-05-31 16:02:35.908 SC-1 osafimmpbed: NO PBE allowing modification to object opensafImm=opensafImm,safApp=safImmService 2018-05-31 16:02:35.922 SC-1 osafimmnd[207]: NO Ccb 2 COMMITTED (immcfg_SC-1_487) 2018-05-31 16:02:35.934 SC-1 test_ccbhdl: src/base/osaf_extended_name.c:144: osaf_extended_name_length: Assertion 'osaf_extended_names_enabled && length >= SA_MAX_UNEXTENDED_NAME_LENGTH' failed.

-----Core dump backtrace-----
(gdb) bt
#0  0x00007faf97b83428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#1  0x00007faf97b8502a in __GI_abort () at abort.c:89
#2  0x00007faf987034ab in __osafassert_fail (__file=__file@entry=0x7faf9873275d "src/base/osaf_extended_name.c",     __line=__line@entry=144, __func=__func@entry=0x7faf987327f0 <__FUNCTION__.3368> "osaf_extended_name_length",     __assertion=__assertion@entry=0x7faf987327a8 "osaf_extended_names_enabled && length >= SA_MAX_UNEXTENDED_NAME_LENGTH")
    at src/base/sysf_def.c:286
#3  0x00007faf986fef89 in osaf_extended_name_length (name=0x564decae3796) at src/base/osaf_extended_name.c:143 #4  0x00007faf9895ef1d in imma_copyAttrValue (p=p@entry=0x564decae2d00, attrValueType=SA_IMM_ATTR_SANAMET,
    attrValue=0x564decae3796) at src/imm/agent/imma_init.cc:434
#5  0x00007faf9896b140 in ccb_object_create_common (ccbHandle=1527757355930828673, className=<optimized out>,     parentName=0x7ffefbb72e20, objectName=<optimized out>, objectName@entry=0x0, attrValues=attrValues@entry=0x7ffefbb72cf0)
    at src/imm/agent/imma_om_api.cc:2079
#6  0x00007faf9896d8cf in saImmOmCcbObjectCreate_2 (ccbHandle=<optimized out>, className=<optimized out>,     parentName=<optimized out>, attrValues=attrValues@entry=0x7ffefbb72cf0) at src/imm/agent/imma_om_api.cc:1660 #7  0x0000564dea9df953 in immom::ImmOmCcbObjectCreate::AddObjectCreateToCcb (this=this@entry=0x7ffefbb72ff0)
    at src/smf/smfd/imm_om_ccapi/om_ccb_object_create.cc:61
#8  0x0000564dea9d8d54 in modelmodify::AddCreateToCcb (ccb_handle=@0x7ffefbb730c8: 1527757355930828673, create_descriptor=...)
    at src/smf/smfd/imm_modify_config/add_operation_to_ccb.cc:103
#9  0x0000564dea9db26c in modelmodify::ModelModification::AddCreate (this=this@entry=0x7ffefbb73870, create_descriptor=...)
    at src/smf/smfd/imm_modify_config/immccb.cc:482
#10 0x0000564dea9dca8b in modelmodify::ModelModification::AddCreates (this=this@entry=0x7ffefbb73870,     create_descriptors=std::vector of length 1, capacity 1 = {...}) at src/smf/smfd/imm_modify_config/immccb.cc:455 #11 0x0000564dea9dce67 in modelmodify::ModelModification::DoModelModification (this=0x7ffefbb73870, modifications=...)
    at src/smf/smfd/imm_modify_config/immccb.cc:107
#12 0x0000564dea9c61af in CreateOneObject () at src/smf/smfd/imm_modify_demo/test_ccbhdl.cc:141 #13 0x0000564dea9bd36c in main () at src/smf/smfd/imm_modify_demo/test_ccbhdl.cc:244

Thanks,
Nguyen

On 5/29/2018 9:40 PM, Lennart Lund wrote:
Summary: smf: Validation error for rollback CCB and a related core dump [#2858]
Review request for Ticket(s): 2858
Peer Reviewer(s): nguyen.tk....@dektech.com.au
Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE ***
Affected branch(es): develop
Development branch: ticket-2858
Base revision: 1c4c6ad57fdf44b228ec83f777ae957e878f1d61
Personal repository: git://git.code.sf.net/u/elunlen/review

--------------------------------
Impacted area       Impact y/n
--------------------------------
  Docs                    n
  Build system            n
  RPM/packaging           n
  Configuration files     n
  Startup scripts         n
  SAF services            y
  OpenSAF services        n
  Core libraries          n
  Samples                 n
  Tests                   n
  Other                   n


Comments (indicate scope for each "y" above):
---------------------------------------------
The lists of IMM operations that are created in many places may contain object
create operations for objects that already exists in the IMM model.
  The lists may also contain more than one create operation for the same 
object. If
a create operation for any of the duplicates is added to the CCB, ERR_EXSIST 
will
be returned. To avoid this it must be checked for each create operation if the 
IMM
model already contains the object and also that the same object create is not 
added
twice to the CCB.
  Also if a duplicate object to create is found the rollbackData that is created
for all IMM operations must be deleted if the corresponding operation is a
duplicate. See doImmOperations() in SmfUtil.cc
  The patch contains a new class that is used to check if an object to be 
created
exist in the IMM model. This class can be found in the new SmfUtils_ObjExist.*
files. A test program for the class is created and can be found in
.../imm_modify_demo/test_objexist.cc. A shell command, test_objexist, is created
and installed if --enble-tests is used with the configure script.
  To make sure duplicate object create requests is not added the ccb descriptor 
is
updated so that a duplicate create descriptor is not added. The ccb decriptor
AddCreate() method will also return false if a create descriptor is not added. 
See
../imm_modify_config/immccb.h
revision cf93518e220de4e0b9053d46850d926ef0293f33
Author: Lennart Lund <lennart.l...@ericsson.com>
Date:   Tue, 29 May 2018 15:47:05 +0200

smf: Validation error for rollback CCB and a related core dump [#2858]

SMF imm operation lists may contain duplicate create operations.
Fix, rollback data shall not be stored for duplicate operations and
duplicate operations shall not be added to the CCB.
Fix, crash in SmfUtil::doImmoperation if the CCB fails



Added Files:
------------
  src/smf/smfd/imm_modify_demo/test_objexist.cc
  src/smf/smfd/SmfUtils_ObjExist.cc
  src/smf/smfd/SmfUtils_ObjExist.h


Complete diffstat:
------------------
  opensaf.spec.in                                    |   3 +-
  src/smf/Makefile.am                                |  42 ++-
  src/smf/smfd/SmfUtils.cc                           |  72 ++++-
  src/smf/smfd/SmfUtils_ObjExist.cc                  | 290 +++++++++++++++++++++
  src/smf/smfd/SmfUtils_ObjExist.h                   |  68 +++++
  .../smfd/imm_modify_config/add_operation_to_ccb.cc |   5 +-
  src/smf/smfd/imm_modify_config/immccb.h            |  53 +++-
  .../{ccbhdl_test.cc => test_ccbhdl.cc}             |   0
  src/smf/smfd/imm_modify_demo/test_objexist.cc      | 127 +++++++++
  9 files changed, 633 insertions(+), 27 deletions(-)


Testing Commands:
-----------------
*** LIST THE COMMAND LINE TOOLS/STEPS TO TEST YOUR CHANGES ***


Testing, Expected Results:
--------------------------
*** PASTE COMMAND OUTPUTS / TEST RESULTS ***


Conditions of Submission:
-------------------------
*** HOW MANY DAYS BEFORE PUSHING, CONSENSUS ETC ***


Arch      Built     Started    Linux distro
-------------------------------------------
mips        n          n
mips64      n          n
x86         n          n
x86_64      n          n
powerpc     n          n
powerpc64   n          n


Reviewer Checklist:
-------------------
[Submitters: make sure that your review doesn't trigger any checkmarks!]


Your checkin has not passed review because (see checked entries):

___ Your RR template is generally incomplete; it has too many blank entries
     that need proper data filled in.

___ You have failed to nominate the proper persons for review and push.

___ Your patches do not have proper short+long header

___ You have grammar/spelling in your header that is unacceptable.

___ You have exceeded a sensible line length in your headers/comments/text.

___ You have failed to put in a proper Trac Ticket # into your commits.

___ You have incorrectly put/left internal data in your comments/files
     (i.e. internal bug tracking tool IDs, product names etc)

___ You have not given any evidence of testing beyond basic build tests.
     Demonstrate some level of runtime or other sanity testing.

___ You have ^M present in some of your files. These have to be removed.

___ You have needlessly changed whitespace or added whitespace crimes
     like trailing spaces, or spaces before tabs.

___ You have mixed real technical changes with whitespace and other
     cosmetic code cleanup changes. These have to be separate commits.

___ You need to refactor your submission into logical chunks; there is
     too much content into a single commit.

___ You have extraneous garbage in your review (merge commits etc)

___ You have giant attachments which should never have been sent;
     Instead you should place your content in a public tree to be pulled.

___ You have too many commits attached to an e-mail; resend as threaded
     commits, or place in a public tree for a pull.

___ You have resent this content multiple times without a clear indication
     of what has changed between each re-send.

___ You have failed to adequately and individually address all of the
     comments and change requests that were proposed in the initial review.

___ You have a misconfigured ~/.gitconfig file (i.e. user.name, user.email etc)

___ Your computer have a badly configured date and time; confusing the
     the threaded patch review.

___ Your changes affect IPC mechanism, and you don't present any results
     for in-service upgradability test.

___ Your changes affect user manual and documentation, your patch series
     do not contain the patch that updates the Doxygen manual.


---
 src/smf/smfd/SmfUtils.cc                      | 37 +++++++++++++++++++++++++++
 src/smf/smfd/SmfUtils_ObjExist.cc             | 14 +++++++---
 src/smf/smfd/SmfUtils_ObjExist.h              |  1 -
 src/smf/smfd/imm_modify_config/immccb.h       |  1 +
 src/smf/smfd/imm_modify_demo/Makefile         |  2 +-
 src/smf/smfd/imm_modify_demo/README           |  2 +-
 src/smf/smfd/imm_modify_demo/test_ccbhdl.cc   | 33 ++++++++++++++++++------
 src/smf/smfd/imm_modify_demo/test_objexist.cc |  6 ++++-
 8 files changed, 80 insertions(+), 16 deletions(-)

diff --git a/src/smf/smfd/SmfUtils.cc b/src/smf/smfd/SmfUtils.cc
index 020392a..8df5b9b 100644
--- a/src/smf/smfd/SmfUtils.cc
+++ b/src/smf/smfd/SmfUtils.cc
@@ -736,6 +736,29 @@ SaAisErrorT SmfImmUtils::doImmOperations(
         TRACE("%s: IsAmfTypeClass() true, class = %s", __FUNCTION__,
               create_descriptor.class_name.c_str());
 
+        // [Nguyen] Just my suggestion:
+        // The dn of the object to be checked for existence can be obtained
+        // from the rollbackData created earlier by below function call.
+        //
+        // result = imm_operation->Execute(rollbackData);
+        //
+        // It basically does all the same things as you do in the
+        // CheckObjectExist::GetObjectRdn() function, except only for
+        // missing BAD_HANDLE error handling. But perhaps, we can try to
+        // add the extra handling here? instead of going through all the
+        // same IMM API calls again, which will increase the processing time.
+        //
+        // To get the object dn from rollbackData, we can probably just add
+        // a SmfRollbackData::getDn() { return m_dn; } public method.
+        //
+        // In fact, we could even make use of the SmfImmUtils::getObject()
+        // function in this file to check if an object exists, but that is
+        // at the disadvantage/risk of not having proper error handling as
+        // what you implemented in CheckObjectExist (only TRY_AGAIN is handled
+        // in immutil_xxx wrapper functions).
+        // In general, it looks like all OM operations handled in this
+        // SmfImmUtils lack the proper error handling in case of BAD_HANDLE
+        // (restart the OM and related handles). Perhaps a future enhancement?
         obj_exist_rc = object_exist_check.IsExisting(create_descriptor);
         if (obj_exist_rc == CheckObjectExist::ReturnCode::kOk) {
           // The object in the create descriptor already exist in the IMM model
@@ -746,6 +769,9 @@ SaAisErrorT SmfImmUtils::doImmOperations(
             delete rollbackData;
             rollbackData = NULL;
           }
+        // [Nguyen] This duplicate check should be done for other objects
+        // as well (objects not of AmfxxxType classes).
+        // So probably put this block outside of IsAmfTypeClass() check.
         } else if (imm_modifications.AddCreate(create_descriptor) == false) {
           // The create descriptor is a duplicate and is not added to the CCB
           // Any corresponding rollbackData shall be deleted
@@ -757,6 +783,14 @@ SaAisErrorT SmfImmUtils::doImmOperations(
         }
       } else {
         // Is not an Amf type class so always add the create descriptor
+        // [Nguyen] We should also check for duplicate objects not of 
AmfxxxType,
+        // but are redundantly added in the same CCB, and delete its 
rollbackData.
+        // So probably combine this with the check inside IsAmfTypeClass().
+        //
+        // Without the check and deleting of the duplicate rollbackData, the 
rollback
+        // would still succeed (I've already tested) because deleting a 
NOT_EXIST
+        // object is considered OK. But that still means we have one redundant
+        // rollbackData and are also not consistent in our intended behavior.
         imm_modifications.AddCreate(create_descriptor);
       }
     } else if (imm_operation->GetOperationType() == SmfImmOperation::Delete) {
@@ -792,6 +826,9 @@ SaAisErrorT SmfImmUtils::doImmOperations(
     }
   }
 
+  // [Nguyen] I think the cleanup here is not really needed,
+  // as the rollbackData will eventually be deleted in the
+  // destructor of SmfRollbackCcb anyway.
   if ((result != SA_AIS_OK) && (io_rollbackCcb != NULL)) {
     // Clear the rollback ccb list if we fail (if there is a list)
     io_rollbackCcb->clearCcbData();
diff --git a/src/smf/smfd/SmfUtils_ObjExist.cc 
b/src/smf/smfd/SmfUtils_ObjExist.cc
index 7eaba6c..a60acf2 100644
--- a/src/smf/smfd/SmfUtils_ObjExist.cc
+++ b/src/smf/smfd/SmfUtils_ObjExist.cc
@@ -47,6 +47,7 @@
 
         ReturnCode acci_rc = AccesorInitialize();
         if (acci_rc == ReturnCode::kRestartOm) {
+          is_initialized_ = false;
           // No delay needed here
           continue;
         } else if (acci_rc == kFail) {
@@ -90,15 +91,18 @@
       rc = aget_rc;
       break;
     }  // check_timer.is_timeout()
-    if ((check_timer.is_timeout() == true) && (rc != ReturnCode::kOk)) {
+    if ((check_timer.is_timeout() == true)
+        && (rc != ReturnCode::kOk)
+        && (rc != ReturnCode::kNotExist)) {
       LOG_NO("%s: IsExisting Timeout", __FUNCTION__);
       is_initialized_ = false;
       rc = ReturnCode::kFail;
     }
 
-    if (rc == ReturnCode::kOk) {
-      is_initialized_ = true;
-    }
+    // [Nguyen] If we didn't fail any previous check,
+    // wouldn't it mean the OM handle was successfully initialized?
+    is_initialized_ = true;
+
     return rc;
   }
 
@@ -282,6 +286,8 @@
           break;
         }
       }
+    // [Nguyen] As I recall, RDN attribute cannot be 'empty' for
+    // an object to be created
     } else {
       object_rdn_ == "";
     }
diff --git a/src/smf/smfd/SmfUtils_ObjExist.h b/src/smf/smfd/SmfUtils_ObjExist.h
index 530970e..cbcd5f5 100644
--- a/src/smf/smfd/SmfUtils_ObjExist.h
+++ b/src/smf/smfd/SmfUtils_ObjExist.h
@@ -65,4 +65,3 @@ class CheckObjectExist {
 };
 
 #endif /* SMFUTILS_OBJEXIST_H */
-
diff --git a/src/smf/smfd/imm_modify_config/immccb.h 
b/src/smf/smfd/imm_modify_config/immccb.h
index 9fd3676..d337fe9 100644
--- a/src/smf/smfd/imm_modify_config/immccb.h
+++ b/src/smf/smfd/imm_modify_config/immccb.h
@@ -141,6 +141,7 @@ struct AttributeDescriptor {
     std::sort(values_as_strings.begin(), values_as_strings.end());
   }
 
+  // [Nguyen] as -> ad ?
   bool operator==(const AttributeDescriptor& as) const {
     return ((as.attribute_name == attribute_name) &&
             (as.value_type == value_type) &&
diff --git a/src/smf/smfd/imm_modify_demo/Makefile 
b/src/smf/smfd/imm_modify_demo/Makefile
index 8dc2740..e58e86b 100644
--- a/src/smf/smfd/imm_modify_demo/Makefile
+++ b/src/smf/smfd/imm_modify_demo/Makefile
@@ -15,5 +15,5 @@
 #
 
 all:
-       $(MAKE) -C ../../../.. bin/ccbdemo_create bin/ccbdemo_delete 
bin/ccbdemo_modify bin/ccbhdl_test
+       $(MAKE) -C ../../../.. bin/ccbdemo_create bin/ccbdemo_delete 
bin/ccbdemo_modify bin/test_ccbhdl
 
diff --git a/src/smf/smfd/imm_modify_demo/README 
b/src/smf/smfd/imm_modify_demo/README
index f202472..c24d406 100644
--- a/src/smf/smfd/imm_modify_demo/README
+++ b/src/smf/smfd/imm_modify_demo/README
@@ -53,7 +53,7 @@ with immlist and immfind to check the results
 
 Running the test program:
 -------------------------
-$ ccbhdl_test
+$ test_ccbhdl
 
 The test program is interactive. It runs a sequence prints out what has been
 done and suggests what the user should verify and stops execution. Execution
diff --git a/src/smf/smfd/imm_modify_demo/test_ccbhdl.cc 
b/src/smf/smfd/imm_modify_demo/test_ccbhdl.cc
index b8ddef9..8008011 100644
--- a/src/smf/smfd/imm_modify_demo/test_ccbhdl.cc
+++ b/src/smf/smfd/imm_modify_demo/test_ccbhdl.cc
@@ -205,7 +205,7 @@ void WaitForUserAction(const std::string& message) {
 }
 
 int main() {
-  cout << "ccbhdl_test" << endl;
+  cout << "test_ccbhdl" << endl;
   cout << "IMM class used for test: ImmTestValuesConfig" << endl;
 
 #if 0 //  Enable trace
@@ -274,7 +274,7 @@ int main() {
   if (modifier.DoModelModification(ccb_descriptor) == false) {
     cout << "Create two more objects in the same CCB, FAIL" << endl;
   } else {
-    cout << "Create two more objects using one CCB, SUCCESS" << endl;
+    cout << "Create two more objects in the same CCB, SUCCESS" << endl;
   }
   cout << endl;
 
@@ -470,6 +470,7 @@ int main() {
   create_descriptor.AddAttribute(attribute_descriptor);
 
   // Reuse the ccb_descriptor and add the object creation
+  // [Nguyen] Call CcbDescriptorCleaner() instead
   ccb_descriptor.create_descriptors.clear();
   ccb_descriptor.delete_descriptors.clear();
   ccb_descriptor.modify_descriptors.clear();
@@ -495,6 +496,12 @@ int main() {
     modifier.GetErrorInformation(error_info);
     cout << "Failing API: '" << error_info.api_name << "' " << endl;
     cout << "AIS error code: " << saf_error(error_info.ais_error) << endl;
+    // [Nguyen] I guess the message is supposed to be as follows?
+    //
+    // cout << "This is NOT an internal error so there shall be a VALID AIS 
error "
+    // "code and AIS API-name" << endl;
+    //
+    // The 'no' is misplaced?
     cout << "This is an internal error so there shall be no valid AIS error "
             "code or AIS API-name" << endl;
 
@@ -537,6 +544,7 @@ int main() {
   create_descriptor.AddAttribute(attribute_descriptor);
 
   // Reuse the ccb_descriptor and add the object creation
+  // [Nguyen] Call CcbDescriptorCleaner() instead
   ccb_descriptor.create_descriptors.clear();
   ccb_descriptor.delete_descriptors.clear();
   ccb_descriptor.modify_descriptors.clear();
@@ -555,6 +563,13 @@ int main() {
     modifier.GetErrorInformation(error_info);
     cout << "Failing API: '" << error_info.api_name << "' " << endl;
     cout << "AIS error code: " << saf_error(error_info.ais_error) << endl;
+    // [Nguyen] I guess the message is supposed to be as follows? like the
+    // one in the second creation attempt.
+    //
+    // cout << "This is NOT an internal error so there shall be a VALID AIS 
error "
+    // "code and AIS API-name" << endl;
+    //
+    // The 'no' is misplaced?
     cout << "This is an internal error so there shall be no valid AIS error "
             "code or AIS API-name" << endl << endl;
 
@@ -578,9 +593,9 @@ int main() {
     cout << "This is not an internal error so there shall be a valid AIS error 
"
             "code and AIS API-name" << endl;
 
-    cout << "Creation of second object shall FAIL. Test SUCCESS" << endl;
+    cout << "Second creation of same object shall FAIL. Test SUCCESS" << endl;
   } else {
-    cout << "Creation of object did not fail. Test FAIL" << endl;
+    cout << "Second creation of same object did not FAIL. Test FAIL" << endl;
   }
   cout << endl;
 
@@ -602,9 +617,9 @@ int main() {
     cout << "This is not an internal error so there shall be a valid AIS error 
"
             "code and AIS API-name" << endl;
 
-    cout << "Creation of third object failed. Test FAIL" << endl;
+    cout << "Third creation of same object failed. Test FAIL" << endl;
   } else {
-    cout << "Creation of object did not fail. Test SUCCESS" << endl;
+    cout << "Third creation of same object did not fail. Test SUCCESS" << endl;
   }
   cout << endl;
 
@@ -614,6 +629,8 @@ int main() {
       "= true (default)" << endl;
   delete_descriptor.object_name = object_name_not_exist + "," +
                                   create_descriptor.parent_name;
+  // [Nguyen] Typo here: create_descriptors -> delete_descriptors
+  // But also redundant as we already called CcbDescriptorCleaner() earlier
   ccb_descriptor.create_descriptors.clear();
   ccb_descriptor.AddDelete(delete_descriptor);
   if (modifier.DoModelModification(ccb_descriptor) == false) {
@@ -628,7 +645,7 @@ int main() {
   delete_descriptor.object_name = object_name + "," +
                                   create_descriptor.parent_name;
   delete_descriptor.ignore_ais_err_not_exist = true;
-  ccb_descriptor.create_descriptors.clear();
+  ccb_descriptor.delete_descriptors.clear();
   ccb_descriptor.AddDelete(delete_descriptor);
   if (modifier.DoModelModification(ccb_descriptor) == false) {
     cout << "Deleting object '" << delete_descriptor.object_name << "' FAIL"
@@ -642,7 +659,7 @@ int main() {
   delete_descriptor.object_name = object_name_not_exist + "," +
                                   create_descriptor.parent_name;
   delete_descriptor.ignore_ais_err_not_exist = false;
-  ccb_descriptor.create_descriptors.clear();
+  ccb_descriptor.delete_descriptors.clear();
   ccb_descriptor.AddDelete(delete_descriptor);
   if (modifier.DoModelModification(ccb_descriptor) == false) {
     cout << "Deleting object '" << delete_descriptor.object_name << "' FAIL"
diff --git a/src/smf/smfd/imm_modify_demo/test_objexist.cc 
b/src/smf/smfd/imm_modify_demo/test_objexist.cc
index 885cc3a..37e07c6 100644
--- a/src/smf/smfd/imm_modify_demo/test_objexist.cc
+++ b/src/smf/smfd/imm_modify_demo/test_objexist.cc
@@ -64,6 +64,8 @@ int main() {
   cout << endl;
 
 
+  // [Nguyen] Isn't it supposed to be:
+  // object_dn = "Kalle,safApp=safLogService" (missing parent's dn)
   object_dn = "Kalle";
   cout << "Object to check '" << object_dn << "'" << endl;
   log_config.values_as_strings.clear();
@@ -108,6 +110,8 @@ int main() {
   log_config.values_as_strings.clear();
   //log_config.AddValue("logConfig=1");
   existing_object.attributes.clear();
+  // [Nguyen] redundant code below?
+  // parent_name was already cleared in previous test
   existing_object.parent_name.clear();
   existing_object.AddAttribute(log_config);
   exist_rc = e_check.IsExisting(existing_object);
@@ -124,4 +128,4 @@ int main() {
 
 
   return 0;
-}
\ No newline at end of file
+}
-- 
2.8.3

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to