[reSIProcate] Endless loop?

David Thompson mrdatman at gmail.com
Fri Aug 3 10:33:00 CDT 2007


I could be mistaken but I believe the following code in InviteSession.cxx
will create an endless loop.

 

I believe we meant to say mInviteSession.refer(mReferTo, mReferSub). 

 

Currently this would continue to call itself by posting this message into
the fifo an endless number of times.

 

Let me know if I am mistaken.

 

 

 

 

void

InviteSession::referCommand(const NameAddr& referTo, bool referSub)

{

   mDum.post(new InviteSessionReferCommand(*this, referTo, referSub));

}

 

class InviteSessionReferCommand : public DumCommandAdapter

{

public:

   InviteSessionReferCommand(InviteSession& inviteSession, const NameAddr&
referTo, bool referSub)

      : mInviteSession(inviteSession),

      mReferTo(referTo),

      mReferSub(referSub)

   {

 

   }

 

   virtual void executeCommand()

   {

      mInviteSession.referCommand(mReferTo, mReferSub);

   }

 

   virtual std::ostream& encodeBrief(std::ostream& strm) const

   {

      return strm << "InviteSessionReferCommand";

   }

 

private:

   InviteSession& mInviteSession;

   NameAddr mReferTo;

   bool mReferSub;

};

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


More information about the resiprocate-devel mailing list