Pause and resume an operational link that was set Inactive (by receiving a changeover while operational).

git-svn-id: http://yate.null.ro/svn/yate/trunk@3580 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2010-08-30 07:04:21 +00:00
parent c41089e5a9
commit c14d9a1a47
1 changed files with 5 additions and 0 deletions

View File

@ -231,10 +231,15 @@ bool SS7Layer2::inhibit(int setFlags, int clrFlags)
int old = m_inhibited;
m_inhibited = (m_inhibited | setFlags) & ~clrFlags;
if (old != m_inhibited) {
bool cycle = (setFlags & Inactive) && operational();
if (cycle)
control(Pause);
Debug(this,DebugNote,"Link inhibition changed 0x%02X -> 0x%02X [%p]",
old,m_inhibited,this);
if (((old != 0) ^ (m_inhibited != 0)) && operational())
notify();
if (cycle)
control(Resume);
}
return true;
}