Fix wrong printouts and incorrect behavior of immadm/immcfg.
Refer to the ticket #2751 for more info.
---
src/imm/tools/imm_admin.c | 4 ++--
src/imm/tools/imm_cfg.c | 7 ++++---
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/imm/tools/imm_admin.c b/src/imm/tools/imm_admin.c
index 040df28..db026f9 100644
--- a/src/imm/tools/imm_admin.c
+++ b/src/imm/tools/imm_admin.c
@@ -318,7 +318,7 @@ int main(int argc, char *argv[])
if (operationId != -1) {
fprintf(
stderr,
- "Cannot set admin operation more then
once");
+ "Cannot set admin operation more then
once\n");
exit(EXIT_FAILURE);
}
operationId = strtoll(optarg, (char **)NULL, 10);
@@ -332,7 +332,7 @@ int main(int argc, char *argv[])
if (operationId != -1) {
fprintf(
stderr,
- "Cannot set admin operation more then
once");
+ "Cannot set admin operation more then
once\n");
exit(EXIT_FAILURE);
}
operationId = SA_IMM_PARAM_ADMOP_ID_ESC;
diff --git a/src/imm/tools/imm_cfg.c b/src/imm/tools/imm_cfg.c
index 4573063..73c5c2e 100644
--- a/src/imm/tools/imm_cfg.c
+++ b/src/imm/tools/imm_cfg.c
@@ -403,7 +403,7 @@ new_attr_mod(const SaNameT *objectName, char *nameval,
SaImmAttrFlagsT *flags)
error = get_attrValueType(attrDefinitions, name,
&attrMod->modAttr.attrValueType, flags);
if (error == SA_AIS_ERR_NOT_EXIST) {
- fprintf(stderr, "Class '%s' does not exist\n", className);
+ fprintf(stderr, "Attribute '%s' does not exist\n", name);
res = -1;
goto done;
}
@@ -661,8 +661,8 @@ int object_create(const SaNameT **objectNames, const
SaImmClassNameT className,
stderr,
"error -
saImmOmAdminOwnerSet FAILED: %s\n",
saf_error(error));
- goto done;
}
+ goto done;
}
}
}
@@ -2069,7 +2069,8 @@ static int imm_operation(int argc, char *argv[])
}
if (!transaction_mode) {
- if (ccbHandle != -1) {
+ /* Don't apply the CCB if there is any error during CCB
preparation */
+ if (ccbHandle != -1 && rc == 0) {
if ((error = immutil_saImmOmCcbApply(ccbHandle)) !=
SA_AIS_OK) {
if (error == SA_AIS_ERR_TIMEOUT)
--
1.9.1
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel