Making sure source's thread is stopped early enough in destructor.

git-svn-id: http://yate.null.ro/svn/yate/trunk@459 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2005-07-20 10:19:07 +00:00
parent 1d7c54d6d7
commit fbde015154
2 changed files with 2 additions and 0 deletions

View File

@ -132,6 +132,7 @@ ToneSource::~ToneSource()
Lock lock(__plugin);
Debug(&__plugin,DebugAll,"ToneSource::~ToneSource() [%p] total=%u stamp=%lu",this,m_total,timeStamp());
tones.remove(this,false);
stop();
if (m_time) {
m_time = Time::now() - m_time;
if (m_time) {

View File

@ -156,6 +156,7 @@ WaveSource::WaveSource(const String& file, CallEndpoint* chan, bool autoclose)
WaveSource::~WaveSource()
{
Debug(&__plugin,DebugAll,"WaveSource::~WaveSource() [%p] total=%u stamp=%lu",this,m_total,timeStamp());
stop();
if (m_time) {
m_time = Time::now() - m_time;
if (m_time) {