Added check to prevent connection to itself.

git-svn-id: http://yate.null.ro/svn/yate/trunk@791 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2006-05-16 16:49:34 +00:00
parent aa0d53ea0f
commit 19bd227d67
1 changed files with 4 additions and 0 deletions

View File

@ -77,6 +77,10 @@ bool CallEndpoint::connect(CallEndpoint* peer, const char* reason, bool notify)
}
if (peer == m_peer)
return true;
if (peer == this) {
Debug(DebugWarn,"CallEndpoint '%s' trying to connect to itself! [%p]",m_id.c_str(),this);
return false;
}
DDebug(DebugAll,"CallEndpoint '%s' connecting peer %p to [%p]",m_id.c_str(),peer,this);
#if 0