SignallingEvent::sendEvent cleans up itself if it has no call attached.

git-svn-id: http://yate.null.ro/svn/yate/trunk@2320 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2008-11-10 18:55:33 +00:00
parent 5be2897476
commit 77d8c38fc2
2 changed files with 9 additions and 2 deletions

View File

@ -339,6 +339,14 @@ SignallingEvent::~SignallingEvent()
}
}
bool SignallingEvent::sendEvent()
{
if (m_call)
return m_call->sendEvent(this);
delete this;
return false;
}
/**
* SignallingCircuitEvent

View File

@ -1220,8 +1220,7 @@ public:
* Send this event through the call that generated it
* @return True if there was a call and the operation succedded
*/
inline bool sendEvent()
{ return m_call && m_call->sendEvent(this); }
bool sendEvent();
private:
Type m_type;