When using the command "immcfg logConfig=1,safApp=safLogService -a logRecordDestinationConfiguration-=<VALUE>" If there is just one value in the multi attribute and we delete last one, the value will be deleted in imm database but it is not deleted in LGD.
The patch update the attribute "logRecordDestinationConfiguration" = empty in lgd after the last value is deleted. --- src/log/logd/lgs_config.cc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/log/logd/lgs_config.cc b/src/log/logd/lgs_config.cc index f096b040f..44e10b84d 100644 --- a/src/log/logd/lgs_config.cc +++ b/src/log/logd/lgs_config.cc @@ -306,10 +306,16 @@ void lgs_cfgupd_multival_delete(const std::string &attribute_name, } } - // Add this new list to the config data list - for (const auto &value : result_list) { - lgs_cfgupd_list_create(attribute_name.c_str(), - const_cast<char *>(value.c_str()), config_data); + if (result_list.empty()) { + // Delete the last value. Create config_data with empty value + lgs_cfgupd_list_create(attribute_name.c_str(), const_cast<char *>(""), + config_data); + } else { + // Add this new list to the config data list + for (const auto &value : result_list) { + lgs_cfgupd_list_create(attribute_name.c_str(), + const_cast<char *>(value.c_str()), config_data); + } } TRACE_LEAVE(); } -- 2.15.1 _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel