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

Reply via email to