Hi
This seems Ok but there is one more problem in the same area that should be
fixed as well.
if (cb_invocation != invocation) {
fprintf(stderr, "logWriteLogCallbackT FAILED: wrong
invocation\n");
return errorCode;
}
Should be changed to:
if (cb_invocation != invocation) {
fprintf(stderr, "logWriteLogCallbackT FAILED: wrong
invocation\n");
return SA_AIS_ERR_BAD_OPERATION;
}
It's not relevant to return errorCode here.
Also, there is a simililar function, saflogtest.c, used for test that also
should be fixed in the same way
Thanks
Lennart
> -----Original Message-----
> From: [email protected] [mailto:[email protected]]
> Sent: den 6 maj 2014 23:08
> To: Lennart Lund
> Cc: [email protected]
> Subject: [PATCH 1 of 1] log: saflogger to return EXIT_FAILURE when
> SaLogWriteLogCallbackT reports error [#884]
>
> osaf/tools/saflog/saflogger/saf_logger.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
>
> saflogger is not returning appropriate exit code to the shell when
> SaLogWriteLogCallbackT returns error.
> The patch exits with EXIT_FAILURE when the SaLogWriteLogCallbackT returns
> error
>
> diff --git a/osaf/tools/saflog/saflogger/saf_logger.c
> b/osaf/tools/saflog/saflogger/saf_logger.c
> --- a/osaf/tools/saflog/saflogger/saf_logger.c
> +++ b/osaf/tools/saflog/saflogger/saf_logger.c
> @@ -194,7 +194,7 @@ poll_retry:
> if (wait_time)
> fprintf(stderr, "Waited for %u seconds.\n",
> wait_time/1000000);
> fprintf(stderr, "logWriteLogCallbackT FAILED: %s\n",
> saf_error(cb_error));
> - return errorCode;
> + return cb_error;
> }
>
> return errorCode;
------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel