Hi Canh Ack, not tested
Thanks Lennart > -----Original Message----- > From: Canh Van Truong [mailto:[email protected]] > Sent: den 30 december 2016 00:40 > To: Lennart Lund <[email protected]>; Vu Minh Nguyen > <[email protected]>; [email protected] > Cc: [email protected] > Subject: [PATCH 1 of 1] log: fix log file is changed during si-swap [#2247] > > osaf/services/saf/logsv/lgs/lgs_stream.cc | 5 ++++- > 1 files changed, 4 insertions(+), 1 deletions(-) > > > The log file is changed during si-swap after patch for #2215 is applied. > > This patch fix to reopen the old log file after si-swap > > diff --git a/osaf/services/saf/logsv/lgs/lgs_stream.cc > b/osaf/services/saf/logsv/lgs/lgs_stream.cc > --- a/osaf/services/saf/logsv/lgs/lgs_stream.cc > +++ b/osaf/services/saf/logsv/lgs/lgs_stream.cc > @@ -733,10 +733,13 @@ void log_stream_open_fileinit(log_stream > TRACE_ENTER2("%s, numOpeners=%u", stream->name.c_str(), stream- > >numOpeners); > > /* first time open? */ > - if ((stream->numOpeners == 0) || (*stream->p_fd == -1)) { > + if (stream->numOpeners == 0) { > /* Create and save current log file name */ > stream->logFileCurrent = stream->fileName + "_" + lgs_get_time(NULL); > log_initiate_stream_files(stream); > + } else if (*stream->p_fd == -1) { > + /* Open cfg/log file due to previous failure or after si-swap */ > + log_initiate_stream_files(stream); > } > > /* Opening a stream will always succeed. If file system problem a new ------------------------------------------------------------------------------ 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
