[reSIProcate] maybe have a bug in Condition::wait()

Scott Godin slgodin at icescape.com
Tue Oct 18 09:52:48 CDT 2005


What version are you using?  This bug has already been fixed in the SVN
head.  The if - should really be a while loop.

 

________________________________

From: resiprocate-devel-bounces at list.sipfoundry.org
[mailto:resiprocate-devel-bounces at list.sipfoundry.org] On Behalf Of
Noiile
Sent: Tuesday, October 18, 2005 7:15 AM
To: resiprocate-devel
Subject: [reSIProcate] maybe have a bug in Condition::wait()

 

resiprocate-devel, Hello 

 

In my win32 project, I used DumThread, AbstractFifo::getNext(int ms)
will be called in DumThread.

When I run my program, Sometimes it will prompt me "Assertion failed:
mSize!=0, file AbstractFifo.cxx, line 57". I think maybe have some
problems in function Condition.wait(), because it returns true but mFifo
is empty. 

So I changed some codes as follows, and it runs well.

 

In function:

AbstractFifo::getNext(int ms)

{

    ....

   if (mFifo.empty())
   {
      bool signaled = mCondition.wait(mMutex, ms);
      if (!signaled || mFifo.empty())             //Changed by NOIILE;
      {
        return 0;
      }
   }
   

    ....

}

 

 

 

Noiile, noiile at hotmail.com

2005-10-18 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20051018/851ec2de/attachment.htm>


More information about the resiprocate-devel mailing list