if modify and create same objet in the a CCB, ntfimcn will receive SA_AIS_ERR_NOT_EXIST when get attribute value from modify callback. note that, object have to contain SA_NOTIFY flag to enable notification.
This fix is get attribute value from local when value not existed. Because ntfimcn had been stored value from create callback before. --- src/ntf/ntfimcnd/ntfimcn_imm.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/ntf/ntfimcnd/ntfimcn_imm.c b/src/ntf/ntfimcnd/ntfimcn_imm.c index 8d73fb35a..4a18e1808 100644 --- a/src/ntf/ntfimcnd/ntfimcn_imm.c +++ b/src/ntf/ntfimcnd/ntfimcn_imm.c @@ -575,8 +575,20 @@ saImmOiCcbObjectModifyCallback(SaImmOiHandleT immOiHandle, SaImmOiCcbIdT ccbId, if (SA_AIS_OK == rc) { ccbOperData->userData = curAttr; } else { - ccbOperData->userData = NULL; - LOG_ER("Failed to get current attributes rc = %u", rc); + struct CcbUtilOperationData *ccbOperDataCreate; + + ccbOperDataCreate = + ccbutil_getCcbOpDataByDN(ccbId, objectName); + if (ccbOperDataCreate != NULL && + ccbOperDataCreate->operationType == CCBUTIL_CREATE) { + curAttr = + (SaImmAttrValuesT_2 **)ccbOperDataCreate + ->param.create.attrValues; + ccbOperData->userData = curAttr; + } else { + ccbOperData->userData = NULL; + LOG_WA("Failed to get current attributes rc = %u", rc); + } } } -- 2.25.1 _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel