osaf/tools/saflog/saflogger/saf_logger.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
saflogger is not returning appropriate exit code to the shell when SaLogWriteLogCallbackT fails either because of an error reported in the callback or because of an invalid invocationId. The patch exits with EXIT_FAILURE in these scenarios. 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 @@ -175,7 +175,7 @@ poll_retry: if (cb_invocation != invocation) { fprintf(stderr, "logWriteLogCallbackT FAILED: wrong invocation\n"); - return errorCode; + return SA_AIS_ERR_BAD_OPERATION; } if (cb_error == SA_AIS_ERR_TRY_AGAIN && wait_time < TEN_SECONDS) { @@ -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 Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel