Hi Thang,

Ack from me, code review only.

Thanks,

Minh


On 15/06/18 20:42, thang.nguyen wrote:
Currently changing attribute saAmfCtDefDisableRestart of SaAmfCompType
object not affect to all components at runtime. Because the change
does not broadcast to all nodes.

Broadcast the change once it is updated.

Similar fix for attribute saAmfCtDefInstantiationLevel.
---
  src/amf/amfd/comptype.cc | 6 ++----
  1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/amf/amfd/comptype.cc b/src/amf/amfd/comptype.cc
index b6d4d6d..8a97d48 100644
--- a/src/amf/amfd/comptype.cc
+++ b/src/amf/amfd/comptype.cc
@@ -532,7 +532,6 @@ static void ccb_apply_modify_hdlr(const 
CcbUtilOperationData_t *opdata) {
          avd_snd_op_req_msg(avd_cb, *it, &param);
        } else if (!strcmp(attribute->attrName, 
"saAmfCtDefInstantiationLevel")) {
          SaUint32T param_val;
-        SaUint32T old_value = comp_type->saAmfCtDefInstantiationLevel;
          if ((attr_mod->modType == SA_IMM_ATTR_VALUES_DELETE) ||
              (attribute->attrValues == nullptr)) {
            param_val = 0;  // Default value as per Section 8.13.1 (B0401)
@@ -547,7 +546,7 @@ static void ccb_apply_modify_hdlr(const 
CcbUtilOperationData_t *opdata) {
          memcpy(param.value, &param_val, param.value_len);
          param.attr_id = saAmfCtDefInstantiationLevel_ID;
          comp_type->saAmfCtDefInstantiationLevel = param_val;
-        if (old_value != param_val) avd_snd_op_req_msg(avd_cb, *it, &param);
+        avd_snd_op_req_msg(avd_cb, *it, &param);
        } else if (!strcmp(attribute->attrName, "saAmfCtDefRecoveryOnError")) {
          SaAmfRecommendedRecoveryT *param_val =
              (SaAmfRecommendedRecoveryT *)attribute->attrValues[0];
@@ -561,7 +560,6 @@ static void ccb_apply_modify_hdlr(const 
CcbUtilOperationData_t *opdata) {
          avd_snd_op_req_msg(avd_cb, *it, &param);
        } else if (!strcmp(attribute->attrName, "saAmfCtDefDisableRestart")) {
          SaBoolT param_val;
-        SaUint32T old_value = comp_type->saAmfCtDefDisableRestart;
          if ((attr_mod->modType == SA_IMM_ATTR_VALUES_DELETE) ||
              (attribute->attrValues == nullptr)) {
            param_val = static_cast<SaBoolT>(
@@ -576,7 +574,7 @@ static void ccb_apply_modify_hdlr(const 
CcbUtilOperationData_t *opdata) {
          memcpy(param.value, &param_val, param.value_len);
          param.attr_id = saAmfCtDefDisableRestart_ID;
          comp_type->saAmfCtDefDisableRestart = param_val;
-        if (old_value != param_val) avd_snd_op_req_msg(avd_cb, *it, &param);
+        avd_snd_op_req_msg(avd_cb, *it, &param);
        } else
          LOG_WA("Unexpected attribute name: %s", attribute->attrName);
      }


------------------------------------------------------------------------------
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