knowledge-database (beta)

Current group: comp.soft-sys.ace

RE: [ace-users] log file sampling bug

RE: [ace-users] log file sampling bug  
Johnny Willemsen
From:Johnny Willemsen
Subject:RE: [ace-users] log file sampling bug
Date:22 Jan 2005 10:26:28 -0600
Hi Kobi,

If you can validate that the ftell is the correct fix, feel free to commit
it and add the reporter to the thanks list.

Johnny

> -----Original Message-----
> From: Kobi Cohen-Arazi [mailto:kobi.cohenarazi@gmail.com]
> Sent: zaterdag 22 januari 2005 14:33
> To: Johnny Willemsen; ace-users@cs.wustl.edu
> Subject: Re: [ace-users] log file sampling bug
>
> Hi Johnny,
>
> You are right. I've already did the tellp part. But the ACE_OS::ftell
> is missing. I can check it in.
>
> Kobi.
>
>
> On Sat, 22 Jan 2005 09:59:50 +0100, Johnny Willemsen
> wrote:
> > Hi,
> >
> > Thanks for using the PRF form.
> >
> > A question back, did you test the code for
> ACE_LACKS_IOSTREAM_TOTALLY? The
> > other part is already in the x.4.3 version which you can obtain from
> > http://deuce.doc.wustl.edu/Download.html
> >
> > Regards,
> > Johnny Willemsen
> > Remedy IT
> > Leeghwaterstraat 25
> > 2811 DT Reeuwijk
> > The Netherlands
> > www.theaceorb.nl / www.remedy.nl
> >
> >
> > > ACE VERSION: 5.4.2
> > >
> > > HOST MACHINE and OPERATING SYSTEM:
> > > Windows XP SP2, Winsock 2
> > >
> > > TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
> > > Visual C++ 7.1
> > >
> > > AREA/CLASS/EXAMPLE AFFECTED:
> > > ACE_wrappers\ace\Logging_Strategy.cpp
> > >
> > > DOES THE PROBLEM AFFECT:
> > > EXECUTION? YES
> > >
> > > SYNOPSIS:
> > > Log-file sampling is not correct.
> > >
> > > DESCRIPTION:
> > > Caculation of current log file size is not correct.
> > >
> > > SAMPLE FIX/WORKAROUND:
> > > My patch is following:
> > >
> > > --- Logging_Strategy.cpp.orig 2004-06-14 08:58:42.000000000 +0900
> > > +++ Logging_Strategy.cpp 2005-01-13 10:51:14.359375000 +0900
> > > @@ -364,11 +364,10 @@
> > > const void *)
> > > {
> > > #if defined (ACE_LACKS_IOSTREAM_TOTALLY)
> > > - if ((size_t) ACE_OS::fseek (this->log_msg_->msg_ostream (),
> > > - 0,
> > > - SEEK_CUR) > this->max_size_)
> > > + if ((size_t) ACE_OS::ftell (this->log_msg_->msg_ostream ()) >
> > > + this->max_size_)
> > > #else
> > > - if ((size_t) this->log_msg_->msg_ostream () > this->max_size_)
> > > + if ((size_t) this->log_msg_->msg_ostream ()->tellp() >
> > > this->max_size_)
> > > #endif /* ACE_LACKS_IOSTREAM_TOTALLY */
> > > {
> > > // Lock out any other logging.
> > >
> >
> >
>
   

Copyright © 2006 knowledge-database   -   All rights reserved