Hm I can see that my carefully placed info log has now been replaced with error! That is wrong and needs to be removed
Skickat från min Sony Xperia™-smartphone Mathivanan Naickan Palanivelu <mathi.naic...@oracle.com> skrev: Ack, What could we do to the multiple LOG entries in the below case? if (rc == -1) { if (errno == EINTR) goto retry; LOG_ER("write FAILED: %s", strerror(errno)); /* Careful with log level here to avoid syslog flooding */ LOG_IN("write '%s' failed - %s", stream->logFileCurrent, strerror(errno)); goto done; Cheers, Mathi. > -----Original Message----- > From: Lennart Lund [mailto:lennart.l...@ericsson.com] > Sent: Tuesday, October 15, 2013 6:36 PM > To: Mathivanan Naickan Palanivelu > Cc: opensaf-devel@lists.sourceforge.net > Subject: [PATCH 1 of 1] lgsv: Incorrect handling of "partial" write of log > record > to file [#536] > > osaf/services/saf/logsv/lgs/lgs_stream.c | 5 ++++- > 1 files changed, 4 insertions(+), 1 deletions(-) > > > Use size of log record when checking if all of the log record is written. > > diff --git a/osaf/services/saf/logsv/lgs/lgs_stream.c > b/osaf/services/saf/logsv/lgs/lgs_stream.c > --- a/osaf/services/saf/logsv/lgs/lgs_stream.c > +++ b/osaf/services/saf/logsv/lgs/lgs_stream.c > @@ -863,8 +863,11 @@ int log_stream_write(log_stream_t *strea > } else { > /* Handle partial writes */ > bytes_written += rc; > - if (bytes_written < stream->fixedLogRecordSize) > + if (bytes_written < count) { > + TRACE("Partial write. bytes_written = %d, count = > %ld", > + bytes_written, count); > goto retry; > + } > } > > rc = 0; ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel