[devel] [PATCH 1/1] amfd: disallow delete of CtCs object if Ct maps to comp [#3028]
Amfd crashes when su is unlocked, The reason for the crash is in the function avd_snd_susi_msg(),get_comp_capability() is called with csi and comp as input parameter. In the function, get_comp_capability(), there is no CtCs object available so ctcstype_db->find returns NULL to ctcs_type. While accessing ctcs_type->saAmfCtCompCapability, AMfd crashes because ctcs_type is NULL. --- src/amf/amfd/ctcstype.cc | 65 +++- 1 file changed, 64 insertions(+), 1 deletion(-) diff --git a/src/amf/amfd/ctcstype.cc b/src/amf/amfd/ctcstype.cc index 5dffdae..3f30ebc 100644 --- a/src/amf/amfd/ctcstype.cc +++ b/src/amf/amfd/ctcstype.cc @@ -28,6 +28,10 @@ AmfDb *ctcstype_db = nullptr; +static void find_ct_name_from_association(const std::string& haystack, + std::string *dn, + const char *needle); + static void ctcstype_db_add(AVD_CTCS_TYPE *ctcstype) { unsigned int rc = ctcstype_db->insert(ctcstype->name, ctcstype); osafassert(rc == NCSCC_RC_SUCCESS); @@ -187,16 +191,75 @@ static SaAisErrorT ctcstype_ccb_completed_cb(CcbUtilOperationData_t *opdata) { opdata, "Modification of SaAmfCtCsType not supported"); break; case CCBUTIL_DELETE: + AVD_CTCS_TYPE *ctcstype; + AVD_COMP_TYPE *comp_type; + AVD_COMP *comp; + CcbUtilOperationData_t *t_opData; + + ctcstype = ctcstype_db->find(Amf::to_string(&opdata->objectName)); + if (ctcstype != nullptr) { +std::string ct_name; +find_ct_name_from_association(Amf::to_string(&opdata->objectName), + &ct_name, ",safVersion"); +TRACE("'%s'", ct_name.c_str()); +comp_type = comptype_db->find(ct_name); +if ((comp_type) && (nullptr != comp_type->list_of_comp)) { + /* check whether there exists a delete operation for + * each of the Comp in the comp_type list in the current CCB + */ + bool comp_exist = false; + TRACE("SaAmfCompType '%s' has components", comp_type->name.c_str()); + comp = comp_type->list_of_comp; + while (comp != nullptr) { +TRACE("%s", osaf_extended_name_borrow(&comp->comp_info.name)); +t_opData = ccbutil_getCcbOpDataByDN(opdata->ccbId, +&comp->comp_info.name); +TRACE("%p", t_opData); +if ((t_opData == nullptr) || +(t_opData->operationType != CCBUTIL_DELETE)) { + TRACE("Here %p", t_opData); + comp_exist = true; + break; +} +comp = comp->comp_type_list_comp_next; + } + if (comp_exist == true) { +rc = SA_AIS_ERR_BAD_OPERATION; +report_ccb_validation_error(opdata, "SaAmfCompType '%s' is in use", +comp_type->name.c_str()); +goto done; + } +} else { +TRACE("SaAmfCompType '%p'. SaAmfCompType '%s' has no components", + comp_type, ct_name.c_str()); + } + } rc = SA_AIS_OK; break; default: osafassert(0); break; } - +done: TRACE_LEAVE2("%u", rc); return rc; } +/** +* Initialize a DN by searching for needle in haystack +* where two times safVersion comes. +* @param haystack +* @param dn +* @param needle +* @note: "safSupportedCsType=safVersion=1\, +* safCSType=AmfDemo1,safVersion=1,safCompType=AmfDemo1" +*/ +static void find_ct_name_from_association(const std::string& haystack, + std::string *dn, + const char *needle) { + std::string::size_type pos = haystack.find(needle); + *dn = haystack.substr(pos + 1); + TRACE("dn %s", (*dn).c_str()); +} static void ctcstype_ccb_apply_cb(CcbUtilOperationData_t *opdata) { AVD_CTCS_TYPE *ctcstype; -- 2.7.4 ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 0/1] Review Request for amfd: disallow delete of CtCs object if Ct maps to comp [#3028]
Summary: amfd: disallow delete of CtCs object if Ct maps to comp [#3028] Review request for Ticket(s): 3028 Peer Reviewer(s): Gary, Minh, Thuan, Thang Pull request to: Gary Affected branch(es): develop Development branch: ticket-3028 Base revision: 1bff38564b69175fa4a0ea2cb1d40bd432581bd6 Personal repository: git://git.code.sf.net/u/zchxphc/review Impacted area Impact y/n Docsn Build systemn RPM/packaging n Configuration files n Startup scripts n SAF servicesy OpenSAF servicesn Core libraries n Samples n Tests n Other n Comments (indicate scope for each "y" above): - *** EXPLAIN/COMMENT THE PATCH SERIES HERE *** revision 0ed16a87a4b141a73c64abea00f9dacd3db6d1b9 Author: phuc.h.chau Date: Thu, 23 May 2019 11:09:28 +0700 amfd: disallow delete of CtCs object if Ct maps to comp [#3028] Amfd crashes when su is unlocked, The reason for the crash is in the function avd_snd_susi_msg(),get_comp_capability() is called with csi and comp as input parameter. In the function, get_comp_capability(), there is no CtCs object available so ctcstype_db->find returns NULL to ctcs_type. While accessing ctcs_type->saAmfCtCompCapability, AMfd crashes because ctcs_type is NULL. Complete diffstat: -- src/amf/amfd/ctcstype.cc | 65 +++- 1 file changed, 64 insertions(+), 1 deletion(-) Testing Commands: - N/A Testing, Expected Results: -- N/A Conditions of Submission: - Acked from reviewer Arch Built StartedLinux distro --- mipsn n mips64 n n x86 n n x86_64 y y 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. ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 1/1] amfd: disallow delete of CtCs object if Ct maps to comp [#3028]
Amfd crashes when su is unlocked, The reason for the crash is in the function avd_snd_susi_msg(),get_comp_capability() is called with csi and comp as input parameter. In the function, get_comp_capability(), there is no CtCs object available so ctcstype_db->find returns NULL to ctcs_type. While accessing ctcs_type->saAmfCtCompCapability, AMfd crashes because ctcs_type is NULL. --- src/amf/amfd/ctcstype.cc | 66 +++- 1 file changed, 65 insertions(+), 1 deletion(-) diff --git a/src/amf/amfd/ctcstype.cc b/src/amf/amfd/ctcstype.cc index 5dffdae..b2524b2 100644 --- a/src/amf/amfd/ctcstype.cc +++ b/src/amf/amfd/ctcstype.cc @@ -27,6 +27,8 @@ #include "amf/amfd/csi.h" AmfDb *ctcstype_db = nullptr; +void find_ct_name_from_association(const std::string &haystack, + std::string *dn, const char *needle); static void ctcstype_db_add(AVD_CTCS_TYPE *ctcstype) { unsigned int rc = ctcstype_db->insert(ctcstype->name, ctcstype); @@ -187,16 +189,78 @@ static SaAisErrorT ctcstype_ccb_completed_cb(CcbUtilOperationData_t *opdata) { opdata, "Modification of SaAmfCtCsType not supported"); break; case CCBUTIL_DELETE: + AVD_CTCS_TYPE *ctcstype; + AVD_COMP_TYPE *comp_type; + AVD_COMP *comp; + CcbUtilOperationData_t *t_opData; + + ctcstype = ctcstype_db->find(Amf::to_string(&opdata->objectName)); + if (ctcstype != nullptr) { +std::string ct_name; +find_ct_name_from_association(Amf::to_string(&opdata->objectName), + &ct_name, ",safVersion"); +TRACE("'%s'", ct_name.c_str()); +comp_type = comptype_db->find(ct_name); +if ((comp_type) && (nullptr != comp_type->list_of_comp)) { + /* check whether there exists a delete operation for + * each of the Comp in the comp_type list in the current CCB + */ + bool comp_exist = false; + TRACE("SaAmfCompType '%s' has components", comp_type->name.c_str()); + comp = comp_type->list_of_comp; + while (comp != nullptr) { +TRACE("%s", osaf_extended_name_borrow(&comp->comp_info.name)); +t_opData = ccbutil_getCcbOpDataByDN(opdata->ccbId, +&comp->comp_info.name); +TRACE("%p", t_opData); +if ((t_opData == nullptr) || +(t_opData->operationType != CCBUTIL_DELETE)) { + TRACE("OperationType: %p", t_opData); + comp_exist = true; + break; +} +comp = comp->comp_type_list_comp_next; + } + if (comp_exist == true) { +rc = SA_AIS_ERR_BAD_OPERATION; +report_ccb_validation_error(opdata, "SaAmfCompType '%s' is in use", +comp_type->name.c_str()); +goto done; + } +} else { +TRACE("SaAmfCompType '%p'. SaAmfCompType '%s' has no components", + comp_type, ct_name.c_str()); + } + } rc = SA_AIS_OK; break; default: osafassert(0); break; } - +done: TRACE_LEAVE2("%u", rc); return rc; } +/** +* Initialize a DN by searching for needle in haystack +* where two times safVersion comes. +* @param haystack +* @param dn +* @param needle +* @note: "safSupportedCsType=safVersion=1\, +* safCSType=AmfDemo1,safVersion=1,safCompType=AmfDemo1" +*/ +void find_ct_name_from_association(const std::string &haystack, + std::string *dn, const char *needle) { + TRACE_ENTER(); + + std::string::size_type pos = haystack.find(needle); + *dn = haystack.substr(pos + 1); + TRACE("dn %s", (*dn).c_str()); + + TRACE_LEAVE(); +} static void ctcstype_ccb_apply_cb(CcbUtilOperationData_t *opdata) { AVD_CTCS_TYPE *ctcstype; -- 2.7.4 ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 0/1] Review Request for Amfd: Disallow delete of CtCs object if Ct maps to comp [#3028] V2
Summary: amfd: disallow delete of CtCs object if Ct maps to comp [#3028] Review request for Ticket(s): 3028 Peer Reviewer(s): Gary, Minh, Thuan, Thang Pull request to: Gary Affected branch(es): develop Development branch: ticket-3028 Base revision: 0661e3a9c17ea1c1ac13550d195b651453423e2f Personal repository: git://git.code.sf.net/u/zchxphc/review Impacted area Impact y/n Docsn Build systemn RPM/packaging n Configuration files n Startup scripts n SAF servicesy OpenSAF servicesn Core libraries n Samples n Tests n Other n Comments (indicate scope for each "y" above): - *** EXPLAIN/COMMENT THE PATCH SERIES HERE *** revision 8eaa35e3352e835ded413f6fadc9ea9c01e8ea3a Author: phuc.h.chau Date: Thu, 13 Jun 2019 16:45:01 +0700 amfd: disallow delete of CtCs object if Ct maps to comp [#3028] Amfd crashes when su is unlocked, The reason for the crash is in the function avd_snd_susi_msg(),get_comp_capability() is called with csi and comp as input parameter. In the function, get_comp_capability(), there is no CtCs object available so ctcstype_db->find returns NULL to ctcs_type. While accessing ctcs_type->saAmfCtCompCapability, AMfd crashes because ctcs_type is NULL. Complete diffstat: -- src/amf/amfd/ctcstype.cc | 66 +++- 1 file changed, 65 insertions(+), 1 deletion(-) Testing Commands: - N/A Testing, Expected Results: -- N/A Conditions of Submission: - Acked from reviewer Arch Built StartedLinux distro --- mipsn n mips64 n n x86 n n x86_64 y y 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. ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 1/1] amfd: disallow delete of CtCs object if Ct maps to comp [#3028]
Amfd crashes when su is unlocked, The reason for the crash is in the function avd_snd_susi_msg(),get_comp_capability() is called with csi and comp as input parameter. In the function, get_comp_capability(), there is no CtCs object available so ctcstype_db->find returns NULL to ctcs_type. While accessing ctcs_type->saAmfCtCompCapability, AMfd crashes because ctcs_type is NULL. --- src/amf/amfd/ctcstype.cc | 46 +- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/src/amf/amfd/ctcstype.cc b/src/amf/amfd/ctcstype.cc index 5dffdae..7e62358 100644 --- a/src/amf/amfd/ctcstype.cc +++ b/src/amf/amfd/ctcstype.cc @@ -187,13 +187,57 @@ static SaAisErrorT ctcstype_ccb_completed_cb(CcbUtilOperationData_t *opdata) { opdata, "Modification of SaAmfCtCsType not supported"); break; case CCBUTIL_DELETE: + AVD_CTCS_TYPE *ctcstype; + AVD_COMP_TYPE *comp_type; + AVD_COMP *comp; + CcbUtilOperationData_t *t_opData; + + ctcstype = ctcstype_db->find(Amf::to_string(&opdata->objectName)); + if (ctcstype != nullptr) { +std::string cst_name, ct_name; +avsv_sanamet_init(Amf::to_string(&opdata->objectName), + cst_name, "safCSType="); +avsv_sanamet_init(cst_name, ct_name, "safVersion"); +TRACE("'%s'", ct_name.c_str()); +comp_type = comptype_db->find(ct_name); +if ((comp_type) && (nullptr != comp_type->list_of_comp)) { + /* check whether there exists a delete operation for + * each of the Comp in the comp_type list in the current CCB + */ + bool comp_exist = false; + TRACE("SaAmfCompType '%s' has components", comp_type->name.c_str()); + comp = comp_type->list_of_comp; + while (comp != nullptr) { +TRACE("%s", osaf_extended_name_borrow(&comp->comp_info.name)); +t_opData = ccbutil_getCcbOpDataByDN(opdata->ccbId, +&comp->comp_info.name); +TRACE("%p", t_opData); +if ((t_opData == nullptr) || +(t_opData->operationType != CCBUTIL_DELETE)) { + TRACE("OperationType: %p", t_opData); + comp_exist = true; + break; +} +comp = comp->comp_type_list_comp_next; + } + if (comp_exist == true) { +rc = SA_AIS_ERR_BAD_OPERATION; +report_ccb_validation_error(opdata, "SaAmfCompType '%s' is in use", +comp_type->name.c_str()); +goto done; + } +} else { +TRACE("SaAmfCompType '%p'. SaAmfCompType '%s' has no components", + comp_type, ct_name.c_str()); + } + } rc = SA_AIS_OK; break; default: osafassert(0); break; } - +done: TRACE_LEAVE2("%u", rc); return rc; } -- 2.7.4 ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 0/1] Review Request for Amfd: Disallow delete of CtCs object if Ct maps to comp [#3028] V3
Summary: Amfd: Disallow delete of CtCs object if Ct maps to comp [#3028] Review request for Ticket(s): 3028 Peer Reviewer(s): Gary, Minh, Thuan, Thang Pull request to: Gary Affected branch(es): develop Development branch: ticket-3028 Base revision: 97e375ff571bbdb163e6846b90e2f2da58394cbb Personal repository: git://git.code.sf.net/u/zchxphc/review Impacted area Impact y/n Docsn Build systemn RPM/packaging n Configuration files n Startup scripts n SAF servicesy OpenSAF servicesn Core libraries n Samples n Tests n Other n Comments (indicate scope for each "y" above): - *** EXPLAIN/COMMENT THE PATCH SERIES HERE *** revision 61069afada9322be0bd0aca4096620aa74b5c379 Author: phuc.h.chau Date: Tue, 25 Jun 2019 13:09:24 +0700 amfd: disallow delete of CtCs object if Ct maps to comp [#3028] Amfd crashes when su is unlocked, The reason for the crash is in the function avd_snd_susi_msg(),get_comp_capability() is called with csi and comp as input parameter. In the function, get_comp_capability(), there is no CtCs object available so ctcstype_db->find returns NULL to ctcs_type. While accessing ctcs_type->saAmfCtCompCapability, AMfd crashes because ctcs_type is NULL. Complete diffstat: -- src/amf/amfd/ctcstype.cc | 46 +- 1 file changed, 45 insertions(+), 1 deletion(-) Testing Commands: - N/A Testing, Expected Results: -- N/A Conditions of Submission: - Acked from reviewer Arch Built StartedLinux distro --- mipsn n mips64 n n x86 n n x86_64 y y 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. ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 0/1] Review Request for smf: Improve SmfAdminStateHandler() Return false if Fail [#3104]
Summary: smf: Improve SmfAdminStateHandler() Return false if Fail [#3104] Review request for Ticket(s): 3104 Peer Reviewer(s): Thang, Thuan Pull request to: Thang Affected branch(es): develop Development branch: ticket-3104 Base revision: a6781e424c8963d03009e555bffbb323a4e290c4 Personal repository: git://git.code.sf.net/u/zchxphc/review Impacted area Impact y/n Docsn Build systemn RPM/packaging n Configuration files n Startup scripts n SAF servicesn OpenSAF servicesy Core libraries n Samples n Tests n Other n Comments (indicate scope for each "y" above): - *** EXPLAIN/COMMENT THE PATCH SERIES HERE *** revision 08707e9f71f4cdf48e33c3ba1413d517cebf2488 Author: phuc.h.chau Date: Mon, 21 Oct 2019 17:12:19 +0700 smf: Improve SmfAdminStateHandler() Return false if Fail [#3104] SW upgrade testing, if found that if a service unit is in INSTANTIATION_FAILED, one_step upgrade will not continue with the software installation. Complete diffstat: -- src/smf/smfd/SmfAdminState.cc | 2 ++ 1 file changed, 2 insertions(+) Testing Commands: - N/A Testing, Expected Results: -- N/A Conditions of Submission: - ACK from reviewers Arch Built StartedLinux distro --- mipsn n mips64 n n x86 n n x86_64 y y 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. ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 1/1] smf: Improve SmfAdminStateHandler() Return false if Fail [#3104]
SW upgrade testing, if found that if a service unit is in INSTANTIATION_FAILED, one_step upgrade will not continue with the software installation. --- src/smf/smfd/SmfAdminState.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/smf/smfd/SmfAdminState.cc b/src/smf/smfd/SmfAdminState.cc index 076f9f0..a54f47f 100644 --- a/src/smf/smfd/SmfAdminState.cc +++ b/src/smf/smfd/SmfAdminState.cc @@ -900,11 +900,13 @@ bool SmfAdminStateHandler::nodeGroupAdminOperation( LOG_NO( "%s: saImmOmAdminOperationInvoke_2 Fail %s", __FUNCTION__, saf_error(imm_rc)); +method_rc = false; errno_ = imm_rc; break; } else if (oi_rc != SA_AIS_OK) { LOG_NO("%s: SaAmfAdminOperationId %d Fail %s", __FUNCTION__, adminOp, saf_error(oi_rc)); +method_rc = false; errno_ = oi_rc; break; } else { -- 2.7.4 ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 0/1] Review Request for smf: Improve SmfAdminStateHandler() Return false if Fail [#3104] V2
Summary: smf: Improve SmfAdminStateHandler() Return false if Fail [#3104] Review request for Ticket(s): 3104 Peer Reviewer(s): Lennart Lund, Thuan Tran, Thang Nguyen Pull request to: Minh Chau, Gary Affected branch(es): develop Development branch: ticket-3104 Base revision: 9b1c588a4f244cb34a304b03c7568e04fa6cd8a7 Personal repository: git://git.code.sf.net/u/zchxphc/review Impacted area Impact y/n Docsn Build systemn RPM/packaging n Configuration files n Startup scripts n SAF servicesn OpenSAF servicesy Core libraries n Samples n Tests n Other n Comments (indicate scope for each "y" above): - *** EXPLAIN/COMMENT THE PATCH SERIES HERE *** revision 4e299fa1d909a40f62d987c6c07d7e61575cff95 Author: phuc.h.chau Date: Wed, 23 Oct 2019 13:36:58 +0700 smf: Improve SmfAdminStateHandler() Return false if Fail [#3104] SW upgrade testing, if found that if a service unit is in INSTANTIATION_FAILED, one_step upgrade will not continue with the software installation. Complete diffstat: -- src/smf/smfd/SmfAdminState.cc | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) Testing Commands: - N/A Testing, Expected Results: -- N/A Conditions of Submission: - ACK from reviewers Arch Built StartedLinux distro --- mipsn n mips64 n n x86 n n x86_64 y y 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. ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 1/1] smf: Improve SmfAdminStateHandler() Return false if Fail [#3104]
SW upgrade testing, if found that if a service unit is in INSTANTIATION_FAILED, one_step upgrade will not continue with the software installation. --- src/smf/smfd/SmfAdminState.cc | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) mode change 100644 => 100755 src/smf/smfd/SmfAdminState.cc diff --git a/src/smf/smfd/SmfAdminState.cc b/src/smf/smfd/SmfAdminState.cc old mode 100644 new mode 100755 index 076f9f0..4730215 --- a/src/smf/smfd/SmfAdminState.cc +++ b/src/smf/smfd/SmfAdminState.cc @@ -858,7 +858,7 @@ bool SmfAdminStateHandler::deleteNodeGroup() { bool SmfAdminStateHandler::nodeGroupAdminOperation( SaAmfAdminOperationIdT adminOp) { - bool method_rc = true; + bool method_rc = false; TRACE_ENTER(); @@ -920,20 +920,17 @@ bool SmfAdminStateHandler::nodeGroupAdminOperation( } else if (imm_rc != SA_AIS_OK) { LOG_NO("%s adminOpTimeout Fail %s", __FUNCTION__, saf_error(imm_rc)); errno_ = imm_rc; -method_rc = false; } else { LOG_NO("%s adminOpTimeout Fail %s", __FUNCTION__, saf_error(oi_rc)); errno_ = oi_rc; -method_rc = false; } } } else { LOG_NO("%s: becomeAdminOwnerOf(%s) Fail", __FUNCTION__, nodeGroupName_s.c_str()); -method_rc = false; } - if (method_rc == true) { + if (admset_rc == true) { TRACE("%s Admin operation is done. Release ownership if nodegroup", __FUNCTION__); if (releaseAdminOwnerOf(nodeGroupName_s) == false) { -- 2.7.4 ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 1/1] smf: Improve SmfAdminStateHandler() Return false if Fail [#3104]
SW upgrade testing, if found that if a service unit is in INSTANTIATION_FAILED, one_step upgrade will not continue with the software installation. --- src/smf/smfd/SmfAdminState.cc | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) mode change 100644 => 100755 src/smf/smfd/SmfAdminState.cc diff --git a/src/smf/smfd/SmfAdminState.cc b/src/smf/smfd/SmfAdminState.cc old mode 100644 new mode 100755 index 076f9f0..4730215 --- a/src/smf/smfd/SmfAdminState.cc +++ b/src/smf/smfd/SmfAdminState.cc @@ -858,7 +858,7 @@ bool SmfAdminStateHandler::deleteNodeGroup() { bool SmfAdminStateHandler::nodeGroupAdminOperation( SaAmfAdminOperationIdT adminOp) { - bool method_rc = true; + bool method_rc = false; TRACE_ENTER(); @@ -920,20 +920,17 @@ bool SmfAdminStateHandler::nodeGroupAdminOperation( } else if (imm_rc != SA_AIS_OK) { LOG_NO("%s adminOpTimeout Fail %s", __FUNCTION__, saf_error(imm_rc)); errno_ = imm_rc; -method_rc = false; } else { LOG_NO("%s adminOpTimeout Fail %s", __FUNCTION__, saf_error(oi_rc)); errno_ = oi_rc; -method_rc = false; } } } else { LOG_NO("%s: becomeAdminOwnerOf(%s) Fail", __FUNCTION__, nodeGroupName_s.c_str()); -method_rc = false; } - if (method_rc == true) { + if (admset_rc == true) { TRACE("%s Admin operation is done. Release ownership if nodegroup", __FUNCTION__); if (releaseAdminOwnerOf(nodeGroupName_s) == false) { -- 2.7.4 ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 0/1] Review Request for smf: Improve SmfAdminStateHandler() Return false if Fail [#3104] V2
Summary: smf: Improve SmfAdminStateHandler() Return false if Fail [#3104] Review request for Ticket(s): 3104 Peer Reviewer(s): Lennart Lund, Thuan Tran, Thang Nguyen Pull request to: Minh Chau, Gary Affected branch(es): develop Development branch: ticket-3104 Base revision: 9b1c588a4f244cb34a304b03c7568e04fa6cd8a7 Personal repository: git://git.code.sf.net/u/zchxphc/review Impacted area Impact y/n Docsn Build systemn RPM/packaging n Configuration files n Startup scripts n SAF servicesn OpenSAF servicesy Core libraries n Samples n Tests n Other n Comments (indicate scope for each "y" above): - *** EXPLAIN/COMMENT THE PATCH SERIES HERE *** revision 39cfd872474ad831e326b24159a8c2799942a355 Author: phuc.h.chau Date: Wed, 23 Oct 2019 17:58:37 +0700 smf: Improve SmfAdminStateHandler() Return false if Fail [#3104] SW upgrade testing, if found that if a service unit is in INSTANTIATION_FAILED, one_step upgrade will not continue with the software installation. Complete diffstat: -- src/smf/smfd/SmfAdminState.cc | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) Testing Commands: - N/A Testing, Expected Results: -- N/A Conditions of Submission: - ACK from reviewers Arch Built StartedLinux distro --- mipsn n mips64 n n x86 n n x86_64 y y 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. ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 1/1] amfd: Fix the data types of attributes inconsistency in get_config() [#3128]
In Amfd, for Configuration::get_config(), object osafAmfDelayNodeFailoverTimeout and osafAmfDelayNodeFailoverNodeWaitTimeout are time_t, but the method uses uint32_t to hold the values of those attributes it leads to the stack memory corrupted --- src/amf/amfd/config.cc | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) mode change 100644 => 100755 src/amf/amfd/config.cc diff --git a/src/amf/amfd/config.cc b/src/amf/amfd/config.cc old mode 100644 new mode 100755 index af72840..375f050 --- a/src/amf/amfd/config.cc +++ b/src/amf/amfd/config.cc @@ -43,20 +43,20 @@ static void ccb_apply_modify_hdlr(struct CcbUtilOperationData *opdata) { configuration->restrict_auto_repair(enabled); } else if (!strcmp(attr_mod->modAttr.attrName, "osafAmfDelayNodeFailoverTimeout")) { - uint32_t delay = 0; // default to 0 if attribute is blank + time_t delay = 0; // default to 0 if attribute is blank if (attr_mod->modType != SA_IMM_ATTR_VALUES_DELETE && attr_mod->modAttr.attrValues != nullptr) { -delay = (*((SaUint32T *)attr_mod->modAttr.attrValues[0])); +delay = (*((time_t *)attr_mod->modAttr.attrValues[0])); } avd_cb->node_failover_delay = delay; TRACE("osafAmfDelayNodeFailoverTimeout changed to '%llu'", avd_cb->node_failover_delay); } else if (!strcmp(attr_mod->modAttr.attrName, "osafAmfDelayNodeFailoverNodeWaitTimeout")) { - uint32_t delay = kDefaultNodeWaitTime; + time_t delay = kDefaultNodeWaitTime; if (attr_mod->modType != SA_IMM_ATTR_VALUES_DELETE && attr_mod->modAttr.attrValues != nullptr) { -delay = (*((SaUint32T *)attr_mod->modAttr.attrValues[0])); +delay = (*((time_t *)attr_mod->modAttr.attrValues[0])); } avd_cb->node_failover_node_wait = delay; TRACE("osafAmfDelayNodeFailoverNodeWaitTimeout changed to '%llu'", @@ -166,18 +166,19 @@ SaAisErrorT Configuration::get_config(void) { (SaImmAttrValuesT_2 ***)&attributes) == SA_AIS_OK) { uint32_t value; +time_t time_value; TRACE("reading configuration '%s'", osaf_extended_name_borrow(&dn)); if (immutil_getAttr("osafAmfRestrictAutoRepairEnable", attributes, 0, &value) == SA_AIS_OK) { configuration->restrict_auto_repair(static_cast(value)); } if (immutil_getAttr("osafAmfDelayNodeFailoverTimeout", attributes, 0, -&value) == SA_AIS_OK) { - avd_cb->node_failover_delay = value; +&time_value) == SA_AIS_OK) { + avd_cb->node_failover_delay = time_value; } if (immutil_getAttr("osafAmfDelayNodeFailoverNodeWaitTimeout", attributes, 0, -&value) == SA_AIS_OK) { - avd_cb->node_failover_node_wait = value; +&time_value) == SA_AIS_OK) { + avd_cb->node_failover_node_wait = time_value; } } -- 2.7.4 ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 0/1] Review Request for amfd: Fix the data types of attributes inconsistency in get_config() [#3128]
Summary: amfd: Fix the data types of attributes inconsistency in get_config() [#3128] Review request for Ticket(s): 3128 Peer Reviewer(s): Vu Pull request to: Vu Affected branch(es): develop Development branch: ticket-3128 Base revision: 6a9481a0c76ebfd8ab433d924fab17eaae724af1 Personal repository: git://git.code.sf.net/u/zchxphc/review Impacted area Impact y/n Docsn Build systemn RPM/packaging n Configuration files n Startup scripts n SAF servicesn OpenSAF servicesy Core libraries n Samples n Tests n Other n Comments (indicate scope for each "y" above): - *** EXPLAIN/COMMENT THE PATCH SERIES HERE *** revision 3a105bffa8e47f1dc2fdc98cd82cd1f9a4906a4b Author: phuc.h.chau Date: Mon, 16 Dec 2019 13:36:01 +0700 amfd: Fix the data types of attributes inconsistency in get_config() [#3128] In Amfd, for Configuration::get_config(), object osafAmfDelayNodeFailoverTimeout and osafAmfDelayNodeFailoverNodeWaitTimeout are time_t, but the method uses uint32_t to hold the values of those attributes it leads to the stack memory corrupted Complete diffstat: -- src/amf/amfd/config.cc | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) Testing Commands: - N/A Testing, Expected Results: -- N/A Conditions of Submission: - ACK from reviewers Arch Built StartedLinux distro --- mipsn n mips64 n n x86 n n x86_64 y y 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. ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 1/1] dtm: rotate all logtraces on demand [#3133]
Adding a new option '--all' that means to rotate all existing logtrace if given along with the '--rotate' option. --- src/dtm/tools/osaflog.cc| 37 - src/dtm/transport/log_server.cc | 11 +++ src/dtm/transport/log_server.h | 1 + 3 files changed, 40 insertions(+), 9 deletions(-) mode change 100644 => 100755 src/dtm/tools/osaflog.cc mode change 100644 => 100755 src/dtm/transport/log_server.cc mode change 100644 => 100755 src/dtm/transport/log_server.h diff --git a/src/dtm/tools/osaflog.cc b/src/dtm/tools/osaflog.cc old mode 100644 new mode 100755 index f6fa168..0efc989 --- a/src/dtm/tools/osaflog.cc +++ b/src/dtm/tools/osaflog.cc @@ -55,6 +55,7 @@ uint64_t Random64Bits(uint64_t seed); bool PrettyPrint(const std::string& log_stream); bool Delete(const std::string& log_stream); bool Rotate(const std::string& log_stream); +bool RotateAll(); std::list OpenLogFiles(const std::string& log_stream); std::string PathName(const std::string& log_stream, int suffix); uint64_t GetInode(int fd); @@ -72,6 +73,7 @@ int main(int argc, char** argv) { {"print", no_argument, nullptr, 'p'}, {"delete", no_argument, nullptr, 'd'}, {"rotate", no_argument, nullptr, 'r'}, + {"all", no_argument, nullptr, 'a'}, {"extract-trace", required_argument, 0, 'e'}, {"max-idle", required_argument, 0, 'i'}, {0, 0, 0, 0}}; @@ -86,6 +88,7 @@ int main(int argc, char** argv) { bool print_result = true; bool delete_result = true; bool rotate_result = true; + bool rotateall_result = true; bool max_file_size_result = true; bool number_of_backups_result = true; bool max_idle_result = true; @@ -93,6 +96,7 @@ int main(int argc, char** argv) { bool pretty_print_set = false; bool delete_set = false; bool rotate_set = false; + bool rotate_all = false; bool max_file_size_set = false; bool max_backups_set = false; bool max_idle_set = false; @@ -105,7 +109,7 @@ int main(int argc, char** argv) { exit(EXIT_FAILURE); } - while ((option = getopt_long(argc, argv, "m:b:p:f:e:i:r", + while ((option = getopt_long(argc, argv, "m:b:p:f:e:i:r:a", long_options, &long_index)) != -1) { switch (option) { case 'p': @@ -121,6 +125,9 @@ int main(int argc, char** argv) { case 'r': rotate_set = true; break; + case 'a': +rotate_all = true; +break; case 'm': max_file_size = base::StrToUint64(optarg, &max_file_size_set); @@ -176,8 +183,10 @@ int main(int argc, char** argv) { flush_set = true; } - if ((argc <= optind && (pretty_print_set || delete_set || rotate_set)) || - (pretty_print_set && delete_set)) { + if ((argc <= optind && (pretty_print_set || delete_set)) || + (pretty_print_set && delete_set) || + (rotate_all && !rotate_set) || + (argc == optind && rotate_set && !rotate_all)) { PrintUsage(argv[0]); exit(EXIT_FAILURE); } @@ -195,10 +204,12 @@ int main(int argc, char** argv) { delete_result = Delete(argv[optind++]); } } - if (rotate_set == true) { -while (rotate_result && optind < argc) { - rotate_result = Rotate(argv[optind++]); -} + if (rotate_all == true && rotate_set == true) { + rotateall_result = RotateAll(); + } else { +while (rotate_result && optind < argc) { + rotate_result = Rotate(argv[optind++]); +} } if (max_backups_set == true) { number_of_backups_result = NoOfBackupFiles(max_backups); @@ -209,8 +220,10 @@ int main(int argc, char** argv) { if (max_idle_set == true) { max_idle_result = SetMaxIdleTime(max_idle); } - if (flush_result && print_result && max_file_size_result && rotate_result && - delete_result && number_of_backups_result && max_idle_result) + + if (flush_result && print_result && max_file_size_result && + rotate_result && delete_result && number_of_backups_result && + max_idle_result && rotateall_result) exit(EXIT_SUCCESS); exit(EXIT_FAILURE); } @@ -237,6 +250,8 @@ void PrintUsage(const char* program_name) { " removing allocated resources in the log\n" " server. Does not delete log files from disk.\n" "--rotate Rotate the specified LOGSTREAM(s).\n" + "--all Rotate all existing LOGSTREAM(s)\n" + " if given along with the '--rotate' option.\n" "--max-file-size=SIZE Set the maximum size of the log file to\n" " SIZE bytes. The log file will be rotated\n" " when it exceeds this size. Su
[devel] [PATCH 0/1] Review Request for dtm: rotate all logtraces on demand [#3133]
Summary: dtm: rotate all logtraces on demand [#3133] Review request for Ticket(s): 3133 Peer Reviewer(s): Vu, Minh, Gary Pull request to: Vu Affected branch(es): develop Development branch: ticket-3133 Base revision: 966a92979f8d00c763db40859a6b76018740a21d Personal repository: git://git.code.sf.net/u/zchxphc/review Impacted area Impact y/n Docsn Build systemn RPM/packaging n Configuration files n Startup scripts n SAF servicesn OpenSAF servicesy Core libraries n Samples n Tests n Other n Comments (indicate scope for each "y" above): - *** EXPLAIN/COMMENT THE PATCH SERIES HERE *** revision 3c2045a487ba0fc685e9f8cc0191cdaff19c9004 Author: phuc.h.chau Date: Sat, 4 Jan 2020 14:13:34 +0700 dtm: rotate all logtraces on demand [#3133] Adding a new option '--all' that means to rotate all existing logtrace if given along with the '--rotate' option. Complete diffstat: -- src/dtm/tools/osaflog.cc| 37 - src/dtm/transport/log_server.cc | 11 +++ src/dtm/transport/log_server.h | 1 + 3 files changed, 40 insertions(+), 9 deletions(-) Testing Commands: - Call `osaflog --rotate --all` Testing, Expected Results: -- Check all logstream it is renamed in /var/log/opensaf Conditions of Submission: - Ack from reviewers Arch Built StartedLinux distro --- mipsn n mips64 n n x86 n n x86_64 y y 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. ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 0/1] Review Request for Review Request for dtm: rotate all logtraces on demand V2 [#3133]
Summary: dtm: rotate all logtraces on demand [#3133] Review request for Ticket(s): 3133 Peer Reviewer(s): Vu, Minh, Gary, Thang Pull request to: Vu Affected branch(es): develop Development branch: ticket-3133 Base revision: d3b3bd1fb4bb3afe5d8252641bc68029f91b69b3 Personal repository: git://git.code.sf.net/u/zchxphc/review Impacted area Impact y/n Docsn Build systemn RPM/packaging n Configuration files n Startup scripts n SAF servicesn OpenSAF servicesy Core libraries n Samples n Tests n Other n Comments (indicate scope for each "y" above): - *** EXPLAIN/COMMENT THE PATCH SERIES HERE *** revision d0239d617be5d123b57dc10a81a0dd583d474073 Author: phuc.h.chau Date: Tue, 7 Jan 2020 10:27:27 +0700 dtm: rotate all logtraces on demand [#3133] Adding a new option '--all' that means to rotate all existing logtrace if given along with the '--rotate' option. This patch also corrects wrong indentation in osaflog.cc file. Complete diffstat: -- src/base/log_writer.h | 1 + src/dtm/tools/osaflog.cc| 41 + src/dtm/transport/log_server.cc | 10 ++ src/dtm/transport/log_server.h | 7 ++- 4 files changed, 46 insertions(+), 13 deletions(-) Testing Commands: - Call `osaflog --rotate --all` Testing, Expected Results: -- check all logstream it is renamed in /var/log/opensaf Conditions of Submission: - Ack from reviewers Arch Built StartedLinux distro --- mipsn n mips64 n n x86 n n x86_64 y y 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. ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 1/1] dtm: rotate all logtraces on demand [#3133]
Adding a new option '--all' that means to rotate all existing logtrace if given along with the '--rotate' option. This patch also corrects wrong indentation in osaflog.cc file. --- src/base/log_writer.h | 1 + src/dtm/tools/osaflog.cc| 41 + src/dtm/transport/log_server.cc | 10 ++ src/dtm/transport/log_server.h | 7 ++- 4 files changed, 46 insertions(+), 13 deletions(-) mode change 100644 => 100755 src/base/log_writer.h mode change 100644 => 100755 src/dtm/tools/osaflog.cc mode change 100644 => 100755 src/dtm/transport/log_server.cc mode change 100644 => 100755 src/dtm/transport/log_server.h diff --git a/src/base/log_writer.h b/src/base/log_writer.h old mode 100644 new mode 100755 index ab2bf32..abd6d47 --- a/src/base/log_writer.h +++ b/src/base/log_writer.h @@ -47,6 +47,7 @@ class LogWriter { void Flush(); void RotateLog(); void SetLogFile(const std::string& log_file) { log_file_ = log_file; } + size_t file_size() const { return current_file_size_; } private: constexpr static const size_t kBufferSize = 128 * size_t{1024}; diff --git a/src/dtm/tools/osaflog.cc b/src/dtm/tools/osaflog.cc old mode 100644 new mode 100755 index f6fa168..4d00e2b --- a/src/dtm/tools/osaflog.cc +++ b/src/dtm/tools/osaflog.cc @@ -55,6 +55,7 @@ uint64_t Random64Bits(uint64_t seed); bool PrettyPrint(const std::string& log_stream); bool Delete(const std::string& log_stream); bool Rotate(const std::string& log_stream); +bool RotateAll(); std::list OpenLogFiles(const std::string& log_stream); std::string PathName(const std::string& log_stream, int suffix); uint64_t GetInode(int fd); @@ -72,6 +73,7 @@ int main(int argc, char** argv) { {"print", no_argument, nullptr, 'p'}, {"delete", no_argument, nullptr, 'd'}, {"rotate", no_argument, nullptr, 'r'}, + {"all", no_argument, nullptr, 'a'}, {"extract-trace", required_argument, 0, 'e'}, {"max-idle", required_argument, 0, 'i'}, {0, 0, 0, 0}}; @@ -93,6 +95,7 @@ int main(int argc, char** argv) { bool pretty_print_set = false; bool delete_set = false; bool rotate_set = false; + bool rotate_all = false; bool max_file_size_set = false; bool max_backups_set = false; bool max_idle_set = false; @@ -105,7 +108,7 @@ int main(int argc, char** argv) { exit(EXIT_FAILURE); } - while ((option = getopt_long(argc, argv, "m:b:p:f:e:i:r", + while ((option = getopt_long(argc, argv, "m:b:p:f:e:i:ra", long_options, &long_index)) != -1) { switch (option) { case 'p': @@ -121,6 +124,9 @@ int main(int argc, char** argv) { case 'r': rotate_set = true; break; + case 'a': +rotate_all = true; +break; case 'm': max_file_size = base::StrToUint64(optarg, &max_file_size_set); @@ -176,14 +182,16 @@ int main(int argc, char** argv) { flush_set = true; } - if ((argc <= optind && (pretty_print_set || delete_set || rotate_set)) || - (pretty_print_set && delete_set)) { - PrintUsage(argv[0]); - exit(EXIT_FAILURE); + if ((argc <= optind && (pretty_print_set || delete_set)) || + (pretty_print_set && delete_set) || + (rotate_all && !rotate_set) || + (argc == optind && rotate_set && !rotate_all)) { +PrintUsage(argv[0]); +exit(EXIT_FAILURE); } if (flush_set == true) { - flush_result = Flush(); +flush_result = Flush(); } if (pretty_print_set == true) { while (print_result && optind < argc) { @@ -195,20 +203,23 @@ int main(int argc, char** argv) { delete_result = Delete(argv[optind++]); } } - if (rotate_set == true) { -while (rotate_result && optind < argc) { - rotate_result = Rotate(argv[optind++]); -} + if (rotate_all == true) { +rotate_result = RotateAll(); + } else { + while (rotate_result && optind < argc) { +rotate_result = Rotate(argv[optind++]); + } } if (max_backups_set == true) { - number_of_backups_result = NoOfBackupFiles(max_backups); +number_of_backups_result = NoOfBackupFiles(max_backups); } if (max_file_size_set == true) { - max_file_size_result = MaxTraceFileSize(max_file_size); +max_file_size_result = MaxTraceFileSize(max_file_size); } if (max_idle_set == true) { max_idle_result = SetMaxIdleTime(max_idle); } + if (flush_result && print_result && max_file_size_result && rotate_result && delete_result && number_of_backups_result && max_idle_result) exit(EXIT_SUCCESS); @@ -237,6 +248,8 @@ void PrintUsage(const char* program_name) { " removing allocated resources in the log\n" "
[devel] [PATCH 0/1] Review Request for dtm: rotate all logtraces on demand V3 [#3133]
Summary: dtm: rotate all logtraces on demand [#3133] Review request for Ticket(s): 3133 Peer Reviewer(s): Vu, Minh, Gary, Thang Pull request to: Vu Affected branch(es): develop Development branch: ticket-3133 Base revision: d3b3bd1fb4bb3afe5d8252641bc68029f91b69b3 Personal repository: git://git.code.sf.net/u/zchxphc/review Impacted area Impact y/n Docsn Build systemn RPM/packaging n Configuration files n Startup scripts n SAF servicesn OpenSAF servicesy Core libraries n Samples n Tests n Other n Comments (indicate scope for each "y" above): - *** EXPLAIN/COMMENT THE PATCH SERIES HERE *** revision 1711e599897d564d83901f1d4e5ef07aee163b3b Author: phuc.h.chau Date: Tue, 7 Jan 2020 13:51:20 +0700 dtm: rotate all logtraces on demand [#3133] Adding a new option '--all' that means to rotate all existing logtrace if given along with the '--rotate' option. This patch also corrects wrong indentation in osaflog.cc file. Complete diffstat: -- src/base/log_writer.h | 1 + src/dtm/README | 15 +- src/dtm/tools/osaflog.cc| 44 +++-- src/dtm/transport/log_server.cc | 12 ++- src/dtm/transport/log_server.h | 8 ++-- 5 files changed, 61 insertions(+), 19 deletions(-) Testing Commands: - Call `osaflog --rotate --all` Testing, Expected Results: -- check all logstream it is renamed in /var/log/opensaf Conditions of Submission: - Ack from reviewers Arch Built StartedLinux distro --- mipsn n mips64 n n x86 n n x86_64 y y 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. ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 1/1] dtm: rotate all logtraces on demand [#3133]
Adding a new option '--all' that means to rotate all existing logtrace if given along with the '--rotate' option. This patch also corrects wrong indentation in osaflog.cc file. --- src/base/log_writer.h | 1 + src/dtm/README | 15 +- src/dtm/tools/osaflog.cc| 44 +++-- src/dtm/transport/log_server.cc | 12 ++- src/dtm/transport/log_server.h | 8 ++-- 5 files changed, 61 insertions(+), 19 deletions(-) diff --git a/src/base/log_writer.h b/src/base/log_writer.h index ab2bf32..abd6d47 100644 --- a/src/base/log_writer.h +++ b/src/base/log_writer.h @@ -47,6 +47,7 @@ class LogWriter { void Flush(); void RotateLog(); void SetLogFile(const std::string& log_file) { log_file_ = log_file; } + size_t file_size() const { return current_file_size_; } private: constexpr static const size_t kBufferSize = 128 * size_t{1024}; diff --git a/src/dtm/README b/src/dtm/README index 430ff19..ff73af7 100644 --- a/src/dtm/README +++ b/src/dtm/README @@ -190,6 +190,9 @@ Options: --delete Delete the specified LOGSTREAM(s) by removing allocated resources in the log server. Does not delete log files from disk. +--rotate Rotate the specified LOGSTREAM(s). +--all Rotate all LOGSTREAM(s). + This option only works with '--rotate'. --max-file-size=SIZE Set the maximum size of the log file to SIZE bytes. The log file will be rotated when it exceeds this size. Suffixes k, M and @@ -197,4 +200,14 @@ Options: gigabytes. --max-backups=NUM Set the maximum number of backup files to retain during log rotation to NUM. - +--extract-trace + If a process produces a core dump file has + THREAD_TRACE_BUFFER enabled, this option + reads the to extract the trace + strings in all threads and writes them to + the file. +--max-idle=NUMSet the maximum number of idle time to NUM" + minutes. If a stream has not been used for + the given time, the stream will be closed. + Given zero (default) to max-idle to disable + this functionality. diff --git a/src/dtm/tools/osaflog.cc b/src/dtm/tools/osaflog.cc index f6fa168..b1fb461 100644 --- a/src/dtm/tools/osaflog.cc +++ b/src/dtm/tools/osaflog.cc @@ -55,6 +55,7 @@ uint64_t Random64Bits(uint64_t seed); bool PrettyPrint(const std::string& log_stream); bool Delete(const std::string& log_stream); bool Rotate(const std::string& log_stream); +bool RotateAll(); std::list OpenLogFiles(const std::string& log_stream); std::string PathName(const std::string& log_stream, int suffix); uint64_t GetInode(int fd); @@ -72,6 +73,7 @@ int main(int argc, char** argv) { {"print", no_argument, nullptr, 'p'}, {"delete", no_argument, nullptr, 'd'}, {"rotate", no_argument, nullptr, 'r'}, + {"all", no_argument, nullptr, 'a'}, {"extract-trace", required_argument, 0, 'e'}, {"max-idle", required_argument, 0, 'i'}, {0, 0, 0, 0}}; @@ -93,6 +95,7 @@ int main(int argc, char** argv) { bool pretty_print_set = false; bool delete_set = false; bool rotate_set = false; + bool rotate_all = false; bool max_file_size_set = false; bool max_backups_set = false; bool max_idle_set = false; @@ -105,7 +108,7 @@ int main(int argc, char** argv) { exit(EXIT_FAILURE); } - while ((option = getopt_long(argc, argv, "m:b:p:f:e:i:r", + while ((option = getopt_long(argc, argv, "m:b:p:f:e:i:ra", long_options, &long_index)) != -1) { switch (option) { case 'p': @@ -121,6 +124,9 @@ int main(int argc, char** argv) { case 'r': rotate_set = true; break; + case 'a': +rotate_all = true; +break; case 'm': max_file_size = base::StrToUint64(optarg, &max_file_size_set); @@ -175,15 +181,15 @@ int main(int argc, char** argv) { pretty_print_set = true; flush_set = true; } - - if ((argc <= optind && (pretty_print_set || delete_set || rotate_set)) || - (pretty_print_set && delete_set)) { - PrintUsage(argv[0]); - exit(EXIT_FAILURE); - } - + if ((argc <= optind && (pretty_print_set || delete_set)) || + (pretty_print_set && delete_set) || + (rotate_all && !rotate_set) || + (argc == optind && rotate_set && !rotate_all)) { +PrintUsage(argv[0]); +exit(EXIT_FAILURE); + } if (flush_set == true) { - flush_
[devel] [PATCH 1/1] imm: imm_list tool add new option --delimeter [#3155]
Make delimiter of multiple attribute value from immlist configurable Update option --pretty-print will not support print with option --atribute --- src/imm/tools/imm_list.c | 113 +++ 1 file changed, 74 insertions(+), 39 deletions(-) mode change 100644 => 100755 src/imm/tools/imm_list.c diff --git a/src/imm/tools/imm_list.c b/src/imm/tools/imm_list.c old mode 100644 new mode 100755 index d1dc422..4326396 --- a/src/imm/tools/imm_list.c +++ b/src/imm/tools/imm_list.c @@ -72,13 +72,18 @@ static void usage(const char *progname) printf("\t-h, --help - display this help and exit\n"); printf( "\t-p, --pretty-print= - select pretty print, default yes\n"); + printf( + "\tdo not support pretty print with option -a, --attribute=NAME\n"); + printf( + "\t-d, --delimiter= - format multiple attribute value\n"); printf("\t-t, --timeout \n"); printf("\t\tutility timeout in seconds\n"); printf("\nEXAMPLE\n"); printf("\timmlist -a saAmfApplicationAdminState safApp=OpenSAF\n"); printf("\timmlist safApp=myApp1 safApp=myApp2\n"); - printf("\timmlist --pretty-print=no -a saAmfAppType safApp=OpenSAF\n"); + printf("\timmlist --pretty-print=no saAmfAppType safApp=OpenSAF\n"); + printf("\timmlist -d 'abc' safApp=OpenSAF\n"); } static void print_attr_value_raw(SaImmValueTypeT attrValueType, @@ -108,6 +113,7 @@ static void print_attr_value_raw(SaImmValueTypeT attrValueType, break; case SA_IMM_ATTR_SANAMET: { SaNameT *myNameT = (SaNameT *)attrValue; + printf("%s", saAisNameBorrow(myNameT)); break; } @@ -117,14 +123,14 @@ static void print_attr_value_raw(SaImmValueTypeT attrValueType, case SA_IMM_ATTR_SAANYT: { SaAnyT *anyp = (SaAnyT *)attrValue; unsigned int i = 0; + if (anyp->bufferSize == 0) { printf("-empty-"); } else { printf("0x"); for (; i < anyp->bufferSize; i++) { - if (((int)anyp->bufferAddr[i]) < 0x10) { + if (((int)anyp->bufferAddr[i]) < 0x10) printf("0"); - } printf("%x", (int)anyp->bufferAddr[i]); } } @@ -141,19 +147,19 @@ static void print_attr_value(SaImmValueTypeT attrValueType, { switch (attrValueType) { case SA_IMM_ATTR_SAINT32T: - printf("%d (0x%x) ", *((SaInt32T *)attrValue), + printf("%d (0x%x)", *((SaInt32T *)attrValue), *((SaInt32T *)attrValue)); break; case SA_IMM_ATTR_SAUINT32T: - printf("%u (0x%x) ", *((SaUint32T *)attrValue), + printf("%u (0x%x)", *((SaUint32T *)attrValue), *((SaUint32T *)attrValue)); break; case SA_IMM_ATTR_SAINT64T: - printf("%lld (0x%llx) ", *((SaInt64T *)attrValue), + printf("%lld (0x%llx)", *((SaInt64T *)attrValue), *((SaInt64T *)attrValue)); break; case SA_IMM_ATTR_SAUINT64T: - printf("%llu (0x%llx) ", *((SaUint64T *)attrValue), + printf("%llu (0x%llx)", *((SaUint64T *)attrValue), *((SaUint64T *)attrValue)); break; case SA_IMM_ATTR_SATIMET: { @@ -163,34 +169,35 @@ static void print_attr_value(SaImmValueTypeT attrValueType, ctime_r(&time, buf); buf[strlen(buf) - 1] = '\0'; /* Remove new line */ - printf("%llu (0x%llx, %s) ", *((SaTimeT *)attrValue), + printf("%llu (0x%llx, %s)", *((SaTimeT *)attrValue), *((SaTimeT *)attrValue), buf); break; } case SA_IMM_ATTR_SAFLOATT: - printf("%.8g ", *((SaFloatT *)attrValue)); + printf("%.8g", *((SaFloatT *)attrValue)); break; case SA_IMM_ATTR_SADOUBLET: - printf("%.17g ", *((SaDoubleT *)attrValue)); + printf("%.17g", *((SaDoubleT *)attrValue)); break; case SA_IMM_ATTR_SANAMET: { SaNameT *myNameT = (SaNameT *)attrValue; - printf("%s (%zu) ", saAisNameBorrow(myNameT), + + printf("%s (%zu)", saAisNameBorrow(myNameT), strlen(saAisNameBorrow(myNameT))); break; } case SA_IMM_ATTR_SASTRINGT: - printf("%s ", *((char **)attrValue)); + printf("%s", *((char **)attrValue)); break; case SA_IMM_ATTR_SAANYT: { SaAnyT *anyp = (SaAnyT *)attrValue; unsigned int i = 0; +
[devel] [PATCH 0/1] Review Request for imm: make delimiter of multiple attribute value from immlist configurable [#3155]
Summary: imm: imm_list tool add new option --delimeter [#3155] Review request for Ticket(s): 3155 Peer Reviewer(s): Vu, Thuan Pull request to: Vu Affected branch(es): develop Development branch: ticket-3155 Base revision: 4bb1251589c5ccfab166b7dc69a4419f9e80571d Personal repository: git://git.code.sf.net/u/zchxphc/review Impacted area Impact y/n Docsn Build systemn RPM/packaging n Configuration files n Startup scripts n SAF servicesn OpenSAF servicesy Core libraries n Samples n Tests n Other n Comments (indicate scope for each "y" above): - *** EXPLAIN/COMMENT THE PATCH SERIES HERE *** revision e2bc1a9e2538d3421ec4d7480f7bad8b12bccf30 Author: phuc.h.chau Date: Tue, 25 Feb 2020 15:55:56 +0700 imm: imm_list tool add new option --delimeter [#3155] Make delimiter of multiple attribute value from immlist configurable Update option --pretty-print will not support print with option --atribute Complete diffstat: -- src/imm/tools/imm_list.c | 113 +++ 1 file changed, 74 insertions(+), 39 deletions(-) Testing Commands: - Call `immlist -d "|" dn=1` Testing, Expected Results: -- Expected: macAddress SA_STRING_T x1:x2:x3:x4|x1:x2:x3:x4 Condition sof Submission: - Ack from reviewers Arch Built StartedLinux distro --- mipsn n mips64 n n x86 n n x86_64 y y 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. ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 1/1] imm: imm_list tool add new option --delimeter [#3155]
Make delimiter of multiple attribute value from immlist configurable Update option --pretty-print will not support print with option --atribute --- src/imm/tools/imm_list.c | 113 +++ 1 file changed, 74 insertions(+), 39 deletions(-) diff --git a/src/imm/tools/imm_list.c b/src/imm/tools/imm_list.c index d1dc422..4326396 100644 --- a/src/imm/tools/imm_list.c +++ b/src/imm/tools/imm_list.c @@ -72,13 +72,18 @@ static void usage(const char *progname) printf("\t-h, --help - display this help and exit\n"); printf( "\t-p, --pretty-print= - select pretty print, default yes\n"); + printf( + "\tdo not support pretty print with option -a, --attribute=NAME\n"); + printf( + "\t-d, --delimiter= - format multiple attribute value\n"); printf("\t-t, --timeout \n"); printf("\t\tutility timeout in seconds\n"); printf("\nEXAMPLE\n"); printf("\timmlist -a saAmfApplicationAdminState safApp=OpenSAF\n"); printf("\timmlist safApp=myApp1 safApp=myApp2\n"); - printf("\timmlist --pretty-print=no -a saAmfAppType safApp=OpenSAF\n"); + printf("\timmlist --pretty-print=no saAmfAppType safApp=OpenSAF\n"); + printf("\timmlist -d 'abc' safApp=OpenSAF\n"); } static void print_attr_value_raw(SaImmValueTypeT attrValueType, @@ -108,6 +113,7 @@ static void print_attr_value_raw(SaImmValueTypeT attrValueType, break; case SA_IMM_ATTR_SANAMET: { SaNameT *myNameT = (SaNameT *)attrValue; + printf("%s", saAisNameBorrow(myNameT)); break; } @@ -117,14 +123,14 @@ static void print_attr_value_raw(SaImmValueTypeT attrValueType, case SA_IMM_ATTR_SAANYT: { SaAnyT *anyp = (SaAnyT *)attrValue; unsigned int i = 0; + if (anyp->bufferSize == 0) { printf("-empty-"); } else { printf("0x"); for (; i < anyp->bufferSize; i++) { - if (((int)anyp->bufferAddr[i]) < 0x10) { + if (((int)anyp->bufferAddr[i]) < 0x10) printf("0"); - } printf("%x", (int)anyp->bufferAddr[i]); } } @@ -141,19 +147,19 @@ static void print_attr_value(SaImmValueTypeT attrValueType, { switch (attrValueType) { case SA_IMM_ATTR_SAINT32T: - printf("%d (0x%x) ", *((SaInt32T *)attrValue), + printf("%d (0x%x)", *((SaInt32T *)attrValue), *((SaInt32T *)attrValue)); break; case SA_IMM_ATTR_SAUINT32T: - printf("%u (0x%x) ", *((SaUint32T *)attrValue), + printf("%u (0x%x)", *((SaUint32T *)attrValue), *((SaUint32T *)attrValue)); break; case SA_IMM_ATTR_SAINT64T: - printf("%lld (0x%llx) ", *((SaInt64T *)attrValue), + printf("%lld (0x%llx)", *((SaInt64T *)attrValue), *((SaInt64T *)attrValue)); break; case SA_IMM_ATTR_SAUINT64T: - printf("%llu (0x%llx) ", *((SaUint64T *)attrValue), + printf("%llu (0x%llx)", *((SaUint64T *)attrValue), *((SaUint64T *)attrValue)); break; case SA_IMM_ATTR_SATIMET: { @@ -163,34 +169,35 @@ static void print_attr_value(SaImmValueTypeT attrValueType, ctime_r(&time, buf); buf[strlen(buf) - 1] = '\0'; /* Remove new line */ - printf("%llu (0x%llx, %s) ", *((SaTimeT *)attrValue), + printf("%llu (0x%llx, %s)", *((SaTimeT *)attrValue), *((SaTimeT *)attrValue), buf); break; } case SA_IMM_ATTR_SAFLOATT: - printf("%.8g ", *((SaFloatT *)attrValue)); + printf("%.8g", *((SaFloatT *)attrValue)); break; case SA_IMM_ATTR_SADOUBLET: - printf("%.17g ", *((SaDoubleT *)attrValue)); + printf("%.17g", *((SaDoubleT *)attrValue)); break; case SA_IMM_ATTR_SANAMET: { SaNameT *myNameT = (SaNameT *)attrValue; - printf("%s (%zu) ", saAisNameBorrow(myNameT), + + printf("%s (%zu)", saAisNameBorrow(myNameT), strlen(saAisNameBorrow(myNameT))); break; } case SA_IMM_ATTR_SASTRINGT: - printf("%s ", *((char **)attrValue)); + printf("%s", *((char **)attrValue)); break; case SA_IMM_ATTR_SAANYT: { SaAnyT *anyp = (SaAnyT *)attrValue; unsigned int i = 0; + if (anyp->bufferSize) { printf("0x");
[devel] [PATCH 0/1] Review Request for imm: make delimiter of multiple attribute value from immlist configurable [#3155] V2
Summary: imm: imm_list tool add new option --delimeter [#3155] Review request for Ticket(s): 3155 Peer Reviewer(s): Vu, Thuan Pull request to: Vu Affected branch(es): develop Development branch: ticket-3155 Base revision: 4bb1251589c5ccfab166b7dc69a4419f9e80571d Personal repository: git://git.code.sf.net/u/zchxphc/review Impacted area Impact y/n Docsn Build systemn RPM/packaging n Configuration files n Startup scripts n SAF servicesn OpenSAF servicesy Core libraries n Samples n Tests n Other n Comments (indicate scope for each "y" above): - *** EXPLAIN/COMMENT THE PATCH SERIES HERE *** revision 7fe1eac3680a71a353fb5f075a694faa8995cf45 Author: phuc.h.chau Date: Wed, 26 Feb 2020 09:48:45 +0700 imm: imm_list tool add new option --delimeter [#3155] Make delimiter of multiple attribute value from immlist configurable Update option --pretty-print will not support print with option --atribute Complete diffstat: -- src/imm/tools/imm_list.c | 113 +++ 1 file changed, 74 insertions(+), 39 deletions(-) Testing Commands: - Call `immlist -d "|" dn=1` Testing, Expected Results: -- Expected: macAddress SA_STRING_T x1:x2:x3:x4|x1:x2:x3:x4 Conditions of Submission: - Ack from reviewers Arch Built StartedLinux distro --- mipsn n mips64 n n x86 n n x86_64 y y 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. ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 0/1] Review Request for imm: make delimiter of multiple attribute value from immlist configurable [#3155] V3
Summary: imm: imm_list tool add new option --delimiter [#3155] Review request for Ticket(s): 3155 Peer Reviewer(s): Thuan, Vu Pull request to: Thuan Affected branch(es): develop Development branch: ticket-3155 Base revision: 5daf899f4ce44d6fd56cc228ad384803712dbf48 Personal repository: git://git.code.sf.net/u/zchxphc/review Impacted area Impact y/n Docsn Build systemn RPM/packaging n Configuration files n Startup scripts n SAF servicesn OpenSAF servicesy Core libraries n Samples n Tests n Other n Comments (indicate scope for each "y" above): - *** EXPLAIN/COMMENT THE PATCH SERIES HERE *** revision ff8b3780cc360c854cb5a38ae2b438aa4dec708b Author: phuc.h.chau Date: Fri, 28 Feb 2020 13:12:41 +0700 imm: imm_list tool add new option --delimiter [#3155] Make delimiter of multiple attribute value from immlist configurable Update option --pretty-print will not support print with option --atribute Complete diffstat: -- src/imm/tools/imm_list.c | 78 +++- 1 file changed, 64 insertions(+), 14 deletions(-) Testing Commands: - Call `immlist -d "|" dn=1` Testing, Expected Results: -- Expected: macAddress SA_STRING_T x1:x2:x3:x4|x1:x2:x3:x4 Conditions of Submission: - Ack from reviewers Arch Built StartedLinux distro --- mipsn n mips64 n n x86 n n x86_64 y y 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. ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 1/1] imm: imm_list tool add new option --delimiter [#3155]
Make delimiter of multiple attribute value from immlist configurable Update option --pretty-print will not support print with option --atribute --- src/imm/tools/imm_list.c | 78 +++- 1 file changed, 64 insertions(+), 14 deletions(-) diff --git a/src/imm/tools/imm_list.c b/src/imm/tools/imm_list.c index d1dc422..09222de 100644 --- a/src/imm/tools/imm_list.c +++ b/src/imm/tools/imm_list.c @@ -72,13 +72,18 @@ static void usage(const char *progname) printf("\t-h, --help - display this help and exit\n"); printf( "\t-p, --pretty-print= - select pretty print, default yes\n"); + printf( + "\tdo not support pretty print with option -a, --attribute=NAME\n"); + printf( + "\t-d, --delimiter= - format multi attribute value\n"); printf("\t-t, --timeout \n"); printf("\t\tutility timeout in seconds\n"); printf("\nEXAMPLE\n"); printf("\timmlist -a saAmfApplicationAdminState safApp=OpenSAF\n"); printf("\timmlist safApp=myApp1 safApp=myApp2\n"); - printf("\timmlist --pretty-print=no -a saAmfAppType safApp=OpenSAF\n"); + printf("\timmlist --pretty-print=no safApp=OpenSAF\n"); + printf("\timmlist -d '|' safApp=OpenSAF\n"); } static void print_attr_value_raw(SaImmValueTypeT attrValueType, @@ -141,19 +146,19 @@ static void print_attr_value(SaImmValueTypeT attrValueType, { switch (attrValueType) { case SA_IMM_ATTR_SAINT32T: - printf("%d (0x%x) ", *((SaInt32T *)attrValue), + printf("%d (0x%x)", *((SaInt32T *)attrValue), *((SaInt32T *)attrValue)); break; case SA_IMM_ATTR_SAUINT32T: - printf("%u (0x%x) ", *((SaUint32T *)attrValue), + printf("%u (0x%x)", *((SaUint32T *)attrValue), *((SaUint32T *)attrValue)); break; case SA_IMM_ATTR_SAINT64T: - printf("%lld (0x%llx) ", *((SaInt64T *)attrValue), + printf("%lld (0x%llx)", *((SaInt64T *)attrValue), *((SaInt64T *)attrValue)); break; case SA_IMM_ATTR_SAUINT64T: - printf("%llu (0x%llx) ", *((SaUint64T *)attrValue), + printf("%llu (0x%llx)", *((SaUint64T *)attrValue), *((SaUint64T *)attrValue)); break; case SA_IMM_ATTR_SATIMET: { @@ -163,24 +168,24 @@ static void print_attr_value(SaImmValueTypeT attrValueType, ctime_r(&time, buf); buf[strlen(buf) - 1] = '\0'; /* Remove new line */ - printf("%llu (0x%llx, %s) ", *((SaTimeT *)attrValue), + printf("%llu (0x%llx, %s)", *((SaTimeT *)attrValue), *((SaTimeT *)attrValue), buf); break; } case SA_IMM_ATTR_SAFLOATT: - printf("%.8g ", *((SaFloatT *)attrValue)); + printf("%.8g", *((SaFloatT *)attrValue)); break; case SA_IMM_ATTR_SADOUBLET: - printf("%.17g ", *((SaDoubleT *)attrValue)); + printf("%.17g", *((SaDoubleT *)attrValue)); break; case SA_IMM_ATTR_SANAMET: { SaNameT *myNameT = (SaNameT *)attrValue; - printf("%s (%zu) ", saAisNameBorrow(myNameT), + printf("%s (%zu)", saAisNameBorrow(myNameT), strlen(saAisNameBorrow(myNameT))); break; } case SA_IMM_ATTR_SASTRINGT: - printf("%s ", *((char **)attrValue)); + printf("%s", *((char **)attrValue)); break; case SA_IMM_ATTR_SAANYT: { SaAnyT *anyp = (SaAnyT *)attrValue; @@ -404,6 +409,8 @@ static void display_class_definition(const SaImmClassNameT className, static void display_object(const char *name, SaImmAccessorHandleT accessorHandle, int pretty_print, + int delimiter_print, + char *character, const SaImmAttrNameT *attributeNames) { int i = 0, j; @@ -411,6 +418,7 @@ static void display_object(const char *name, SaNameT objectName; SaAisErrorT error; SaImmAttrValuesT_2 **attributes; + char *seperate_character = ""; saAisNameLend(name, &objectName); @@ -428,6 +436,14 @@ static void display_object(const char *name, exit(EXIT_FAILURE); } + if (delimiter_print) + seperate_character = character; + else + if (pretty_print) + seperate_character = " "; + else + seperate_character = ":"; + if (pretty_print) { printf("%-50s %-12s Value(s)\n", "Name", "Type"); printf( @@ -436,9 +452,13 @@ static void display_object
[devel] [PATCH 0/1] Review Request for imm: make delimiter of multiple attribute value from immlist configurable [#3155] V4
Summary: imm: imm_list tool add new option --delimiter [#3155] Review request for Ticket(s): 3155 Peer Reviewer(s): Thuan, Vu, Thang Pull request to: Thuan Affected branch(es): develop Development branch: ticket-3155 Base revision: 37a81d9aedead951488eab02d957abb080d1f8b9 Personal repository: git://git.code.sf.net/u/zchxphc/review Impacted area Impact y/n Docsn Build systemn RPM/packaging n Configuration files n Startup scripts n SAF servicesn OpenSAF servicesy Core libraries n Samples n Tests n Other n Comments (indicate scope for each "y" above): - *** EXPLAIN/COMMENT THE PATCH SERIES HERE *** revision e07fc94890de3d944e39df0d758809279825baed Author: phuc.h.chau Date: Fri, 28 Feb 2020 18:16:39 +0700 imm: imm_list tool add new option --delimiter [#3155] Make delimiter of multiple attribute value from immlist configurable Update usage --pretty-print does not work with option -a and -c Complete diffstat: -- src/imm/tools/imm_list.c | 48 +++- 1 file changed, 35 insertions(+), 13 deletions(-) Testing Commands: - Call `immlist -d "|" dn=1` Testing, Expected Results: -- Expected: macAddress SA_STRING_T x1:x2:x3:x4|x1:x2:x3:x4 Conditions of Submission: - Ack from reviewers Arch Built StartedLinux distro --- mipsn n mips64 n n x86 n n x86_64 y y 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. ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 1/1] imm: imm_list tool add new option --delimiter [#3155]
Make delimiter of multiple attribute value from immlist configurable Update usage --pretty-print does not work with option -a and -c --- src/imm/tools/imm_list.c | 48 +++- 1 file changed, 35 insertions(+), 13 deletions(-) diff --git a/src/imm/tools/imm_list.c b/src/imm/tools/imm_list.c index d1dc422..1ea31d9 100644 --- a/src/imm/tools/imm_list.c +++ b/src/imm/tools/imm_list.c @@ -72,6 +72,11 @@ static void usage(const char *progname) printf("\t-h, --help - display this help and exit\n"); printf( "\t-p, --pretty-print= - select pretty print, default yes\n"); + printf( + "\t\t--pretty-print does not work with the options -a and -c\n"); + printf( + "\t-d,--delimiter= - use one to separate values of\n"); + printf("\t\tmultiple attribute\n"); printf("\t-t, --timeout \n"); printf("\t\tutility timeout in seconds\n"); @@ -79,6 +84,7 @@ static void usage(const char *progname) printf("\timmlist -a saAmfApplicationAdminState safApp=OpenSAF\n"); printf("\timmlist safApp=myApp1 safApp=myApp2\n"); printf("\timmlist --pretty-print=no -a saAmfAppType safApp=OpenSAF\n"); + printf("\timmlist -d \"|\" safApp=OpenSAF\n"); } static void print_attr_value_raw(SaImmValueTypeT attrValueType, @@ -141,19 +147,19 @@ static void print_attr_value(SaImmValueTypeT attrValueType, { switch (attrValueType) { case SA_IMM_ATTR_SAINT32T: - printf("%d (0x%x) ", *((SaInt32T *)attrValue), + printf("%d (0x%x)", *((SaInt32T *)attrValue), *((SaInt32T *)attrValue)); break; case SA_IMM_ATTR_SAUINT32T: - printf("%u (0x%x) ", *((SaUint32T *)attrValue), + printf("%u (0x%x)", *((SaUint32T *)attrValue), *((SaUint32T *)attrValue)); break; case SA_IMM_ATTR_SAINT64T: - printf("%lld (0x%llx) ", *((SaInt64T *)attrValue), + printf("%lld (0x%llx)", *((SaInt64T *)attrValue), *((SaInt64T *)attrValue)); break; case SA_IMM_ATTR_SAUINT64T: - printf("%llu (0x%llx) ", *((SaUint64T *)attrValue), + printf("%llu (0x%llx)", *((SaUint64T *)attrValue), *((SaUint64T *)attrValue)); break; case SA_IMM_ATTR_SATIMET: { @@ -163,24 +169,24 @@ static void print_attr_value(SaImmValueTypeT attrValueType, ctime_r(&time, buf); buf[strlen(buf) - 1] = '\0'; /* Remove new line */ - printf("%llu (0x%llx, %s) ", *((SaTimeT *)attrValue), + printf("%llu (0x%llx, %s)", *((SaTimeT *)attrValue), *((SaTimeT *)attrValue), buf); break; } case SA_IMM_ATTR_SAFLOATT: - printf("%.8g ", *((SaFloatT *)attrValue)); + printf("%.8g", *((SaFloatT *)attrValue)); break; case SA_IMM_ATTR_SADOUBLET: - printf("%.17g ", *((SaDoubleT *)attrValue)); + printf("%.17g", *((SaDoubleT *)attrValue)); break; case SA_IMM_ATTR_SANAMET: { SaNameT *myNameT = (SaNameT *)attrValue; - printf("%s (%zu) ", saAisNameBorrow(myNameT), + printf("%s (%zu)", saAisNameBorrow(myNameT), strlen(saAisNameBorrow(myNameT))); break; } case SA_IMM_ATTR_SASTRINGT: - printf("%s ", *((char **)attrValue)); + printf("%s", *((char **)attrValue)); break; case SA_IMM_ATTR_SAANYT: { SaAnyT *anyp = (SaAnyT *)attrValue; @@ -404,6 +410,7 @@ static void display_class_definition(const SaImmClassNameT className, static void display_object(const char *name, SaImmAccessorHandleT accessorHandle, int pretty_print, + char delimiter, const SaImmAttrNameT *attributeNames) { int i = 0, j; @@ -436,9 +443,12 @@ static void display_object(const char *name, printf("\n%-50s %-12s ", attr->attrName, get_attr_type_name(attr->attrValueType)); if (attr->attrValuesNumber > 0) { - for (j = 0; j < attr->attrValuesNumber; j++) + for (j = 0; j < attr->attrValuesNumber; j++) { print_attr_value(attr->attrValueType, attr->attrValues[j]); + if ((j + 1) < attr->attrValuesNumber) + printf("%c", delimiter); + } } else pr
[devel] [PATCH 1/1] imm: imm_list tool add new option --delimiter [#3155]
Make delimiter of multiple attribute value from immlist configurable Update usage --pretty-print does not work with option -a and -c --- src/imm/tools/imm_list.c | 49 +++- 1 file changed, 36 insertions(+), 13 deletions(-) diff --git a/src/imm/tools/imm_list.c b/src/imm/tools/imm_list.c index d1dc422..c2e84e9 100644 --- a/src/imm/tools/imm_list.c +++ b/src/imm/tools/imm_list.c @@ -72,6 +72,11 @@ static void usage(const char *progname) printf("\t-h, --help - display this help and exit\n"); printf( "\t-p, --pretty-print= - select pretty print, default yes\n"); + printf( + "\t\t--pretty-print does not work with the options -a and -c\n"); + printf( + "\t-d,--delimiter= - separate multiple attribute "); + printf("values by \n"); printf("\t-t, --timeout \n"); printf("\t\tutility timeout in seconds\n"); @@ -79,6 +84,8 @@ static void usage(const char *progname) printf("\timmlist -a saAmfApplicationAdminState safApp=OpenSAF\n"); printf("\timmlist safApp=myApp1 safApp=myApp2\n"); printf("\timmlist --pretty-print=no -a saAmfAppType safApp=OpenSAF\n"); + printf("\timmlist -d '|' -a safAmfNodeGroup "); + printf("safAmfNodeGroup=AllNodes,safAmfCluster=myAmfCluster\n"); } static void print_attr_value_raw(SaImmValueTypeT attrValueType, @@ -141,19 +148,19 @@ static void print_attr_value(SaImmValueTypeT attrValueType, { switch (attrValueType) { case SA_IMM_ATTR_SAINT32T: - printf("%d (0x%x) ", *((SaInt32T *)attrValue), + printf("%d (0x%x)", *((SaInt32T *)attrValue), *((SaInt32T *)attrValue)); break; case SA_IMM_ATTR_SAUINT32T: - printf("%u (0x%x) ", *((SaUint32T *)attrValue), + printf("%u (0x%x)", *((SaUint32T *)attrValue), *((SaUint32T *)attrValue)); break; case SA_IMM_ATTR_SAINT64T: - printf("%lld (0x%llx) ", *((SaInt64T *)attrValue), + printf("%lld (0x%llx)", *((SaInt64T *)attrValue), *((SaInt64T *)attrValue)); break; case SA_IMM_ATTR_SAUINT64T: - printf("%llu (0x%llx) ", *((SaUint64T *)attrValue), + printf("%llu (0x%llx)", *((SaUint64T *)attrValue), *((SaUint64T *)attrValue)); break; case SA_IMM_ATTR_SATIMET: { @@ -163,24 +170,24 @@ static void print_attr_value(SaImmValueTypeT attrValueType, ctime_r(&time, buf); buf[strlen(buf) - 1] = '\0'; /* Remove new line */ - printf("%llu (0x%llx, %s) ", *((SaTimeT *)attrValue), + printf("%llu (0x%llx, %s)", *((SaTimeT *)attrValue), *((SaTimeT *)attrValue), buf); break; } case SA_IMM_ATTR_SAFLOATT: - printf("%.8g ", *((SaFloatT *)attrValue)); + printf("%.8g", *((SaFloatT *)attrValue)); break; case SA_IMM_ATTR_SADOUBLET: - printf("%.17g ", *((SaDoubleT *)attrValue)); + printf("%.17g", *((SaDoubleT *)attrValue)); break; case SA_IMM_ATTR_SANAMET: { SaNameT *myNameT = (SaNameT *)attrValue; - printf("%s (%zu) ", saAisNameBorrow(myNameT), + printf("%s (%zu)", saAisNameBorrow(myNameT), strlen(saAisNameBorrow(myNameT))); break; } case SA_IMM_ATTR_SASTRINGT: - printf("%s ", *((char **)attrValue)); + printf("%s", *((char **)attrValue)); break; case SA_IMM_ATTR_SAANYT: { SaAnyT *anyp = (SaAnyT *)attrValue; @@ -404,6 +411,7 @@ static void display_class_definition(const SaImmClassNameT className, static void display_object(const char *name, SaImmAccessorHandleT accessorHandle, int pretty_print, + char delimiter, const SaImmAttrNameT *attributeNames) { int i = 0, j; @@ -436,9 +444,12 @@ static void display_object(const char *name, printf("\n%-50s %-12s ", attr->attrName, get_attr_type_name(attr->attrValueType)); if (attr->attrValuesNumber > 0) { - for (j = 0; j < attr->attrValuesNumber; j++) + for (j = 0; j < attr->attrValuesNumber; j++) { print_attr_value(attr->attrValueType, attr->attrValues[j]); + if ((j + 1) < attr->attrValuesNumber) + printf("%c", delimiter); + }
[devel] [PATCH 0/1] Review Request for imm: make delimiter of multiple attribute value from immlist configurable [#3155] V5
Summary: imm: imm_list tool add new option --delimiter [#3155] Review request for Ticket(s): 3155 Peer Reviewer(s): Thuan, Vu, Thang Pull request to: Thuan Affected branch(es): develop Development branch: ticket-3155 Base revision: 37a81d9aedead951488eab02d957abb080d1f8b9 Personal repository: git://git.code.sf.net/u/zchxphc/review Impacted area Impact y/n Docsn Build systemn RPM/packaging n Configuration files n Startup scripts n SAF servicesn OpenSAF servicesy Core libraries n Samples n Tests n Other n Comments (indicate scope for each "y" above): - *** EXPLAIN/COMMENT THE PATCH SERIES HERE *** revision 8f07ef09451d8abf0ae384d5dca540705184ab48 Author: phuc.h.chau Date: Mon, 2 Mar 2020 14:09:30 +0700 imm: imm_list tool add new option --delimiter [#3155] Make delimiter of multiple attribute value from immlist configurable Update usage --pretty-print does not work with option -a and -c Complete diffstat: -- src/imm/tools/imm_list.c | 49 +++- 1 file changed, 36 insertions(+), 13 deletions(-) Testing Commands: - Call `immlist -d "|" dn=1` Testing, Expected Results: -- Expected: macAddress SA_STRING_T x1:x2:x3:x4|x1:x2:x3:x4 Conditions of Submission: - Ack from reviewers Arch Built StartedLinux distro --- mipsn n mips64 n n x86 n n x86_64 y y 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. ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 0/1] Review Request for imm: enhance "immlist --help" output more appropriate [#3165]
Summary: imm: enhance "immlist --help" output more appropriate [#3165] Review request for Ticket(s): 3165 Peer Reviewer(s): Thuan, Vu Pull request to: Thuan Affected branch(es): develop Development branch: ticket-3165 Base revision: f78101b9a5021466bdf40dea67639f3e8b94048c Personal repository: git://git.code.sf.net/u/zchxphc/review Impacted area Impact y/n Docsn Build systemn RPM/packaging n Configuration files n Startup scripts n SAF servicesn OpenSAF servicesy Core libraries n Samples n Tests n Other n NOTE: Patch(es) contain lines longer than 80 characers Comments (indicate scope for each "y" above): - *** EXPLAIN/COMMENT THE PATCH SERIES HERE *** revision 68bde54ba78d6db573778f3f8260243d1c28f26d Author: phuc.h.chau Date: Mon, 9 Mar 2020 17:05:58 +0700 imm: enhance "immlist --help" output more appropriate [#3165] After a caption down the line for information more clearly Complete diffstat: -- src/imm/tools/imm_list.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Testing Commands: - N/A Testing, Expected Results: -- N/A Conditions of Submission: - ACK by reviewers Arch Built StartedLinux distro --- mipsn n mips64 n n x86 n n x86_64 y y 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. ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 1/1] imm: enhance "immlist --help" output more appropriate [#3165]
After a caption down the line for information more clearly --- src/imm/tools/imm_list.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/imm/tools/imm_list.c b/src/imm/tools/imm_list.c index fd2537a..b5694bb 100644 --- a/src/imm/tools/imm_list.c +++ b/src/imm/tools/imm_list.c @@ -75,7 +75,7 @@ static void usage(const char *progname) printf( "\t\t--pretty-print does not work with the options -a and -c\n"); printf( - "\t-d, --delimiter= - separate multiple attribute values by "); + "\t-d, --delimiter= - separate multiple attribute values by \n"); printf("\t-t, --timeout \n"); printf("\t\tutility timeout in seconds\n"); @@ -83,7 +83,7 @@ static void usage(const char *progname) printf("\timmlist -a saAmfApplicationAdminState safApp=OpenSAF\n"); printf("\timmlist safApp=myApp1 safApp=myApp2\n"); printf("\timmlist --pretty-print=no -a saAmfAppType safApp=OpenSAF\n"); - printf("\timmlist -d '|' -a safAmfNodeGroup safAmfNodeGroup=AllNodes,safAmfCluster=myAmfCluster"); + printf("\timmlist -d '|' -a safAmfNodeGroup safAmfNodeGroup=AllNodes,safAmfCluster=myAmfCluster\n"); } static void print_attr_value_raw(SaImmValueTypeT attrValueType, -- 2.7.4 ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 1/1] imm: fix memory leak reeported by valgrind [#3199]
Fix definitely lost reported by valgrind. --- src/imm/immd/immd_proc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/imm/immd/immd_proc.c b/src/imm/immd/immd_proc.c index 69e23f2..648f8b7 100644 --- a/src/imm/immd/immd_proc.c +++ b/src/imm/immd/immd_proc.c @@ -824,6 +824,7 @@ uint32_t immd_process_immnd_down(IMMD_CB *cb, IMMD_IMMND_INFO_NODE *immnd_info, } free(tmpData); + ncs_reset_uba(&uba); } } else { /* Standby NOT immediately sending D2ND_DISCARD_NODE. But will -- 2.7.4 ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 0/1] Review Request for imm: fix memory leak reeported by valgrind [#3199]
Summary: imm: fix memory leak reeported by valgrind [#3199] Review request for Ticket(s): 3199 Peer Reviewer(s): Thuan, Thang Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE *** Affected branch(es): develop Development branch: ticket-3199 Base revision: b0086e3c5da87fad844e76c8c648f6dc6e7ae73a Personal repository: git://git.code.sf.net/u/zchxphc/review Impacted area Impact y/n Docsn Build systemn RPM/packaging n Configuration files n Startup scripts n SAF servicesn OpenSAF servicesy Core libraries n Samples n Tests n Other n Comments (indicate scope for each "y" above): - *** EXPLAIN/COMMENT THE PATCH SERIES HERE *** revision 8bb21a0deee5f43ab74bad1c843c0ed0c51cdea5 Author: phuc.h.chau Date: Thu, 9 Jul 2020 10:30:31 +0700 imm: fix memory leak reeported by valgrind [#3199] Fix definitely lost reported by valgrind. Complete diffstat: -- src/imm/immd/immd_proc.c | 1 + 1 file changed, 1 insertion(+) Testing Commands: - N/A Testing, Expected Results: -- N/A Conditions of Submission: - Ack from reviewer Arch Built StartedLinux distro --- mipsn n mips64 n n x86 n n x86_64 y y 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. ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 0/1] Review Request for imm: fix memory leak reported by valgrind [#3199] V2
Summary: imm: fix memory leak reported by valgrind [#3199] Review request for Ticket(s): 3199 Peer Reviewer(s): Thuan, Thang Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE *** Affected branch(es): develop Development branch: ticket-3199 Base revision: b0086e3c5da87fad844e76c8c648f6dc6e7ae73a Personal repository: git://git.code.sf.net/u/zchxphc/review Impacted area Impact y/n Docsn Build systemn RPM/packaging n Configuration files n Startup scripts n SAF servicesn OpenSAF servicesy Core libraries n Samples n Tests n Other n Comments (indicate scope for each "y" above): - *** EXPLAIN/COMMENT THE PATCH SERIES HERE *** revision 133a4ea781b81f6e12074aaf28302c5499d42ae0 Author: phuc.h.chau Date: Thu, 9 Jul 2020 16:40:51 +0700 imm: fix memory leak reported by valgrind [#3199] Fix definitely lost reported by valgrind. Complete diffstat: -- src/imm/immd/immd_proc.c | 2 ++ 1 file changed, 2 insertions(+) Testing Commands: - N/A Testing, Expected Results: -- N/A Conditions of Submission: -- ACK from reviewers Arch Built StartedLinux distro --- mipsn n mips64 n n x86 n n x86_64 y y 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. ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 1/1] imm: fix memory leak reported by valgrind [#3199]
Fix definitely lost reported by valgrind. --- src/imm/immd/immd_proc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/imm/immd/immd_proc.c b/src/imm/immd/immd_proc.c index 69e23f2..c1c2700 100644 --- a/src/imm/immd/immd_proc.c +++ b/src/imm/immd/immd_proc.c @@ -824,6 +824,7 @@ uint32_t immd_process_immnd_down(IMMD_CB *cb, IMMD_IMMND_INFO_NODE *immnd_info, } free(tmpData); + m_MMGR_FREE_BUFR_LIST(uba.start); } } else { /* Standby NOT immediately sending D2ND_DISCARD_NODE. But will @@ -935,6 +936,7 @@ void immd_pending_discards(IMMD_CB *cb) } free(tmpData); + m_MMGR_FREE_BUFR_LIST(uba.start); } LOG_IN("Removing pending discard for node:%x epoch:%u", -- 2.7.4 ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel