Initiate linkset emergency restore procedures only if link count worsened.

git-svn-id: http://yate.null.ro/svn/yate/trunk@3631 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2010-09-03 08:48:22 +00:00
parent fa96b8ee16
commit 7de0a58622
1 changed files with 5 additions and 3 deletions

View File

@ -1037,8 +1037,6 @@ void SS7MTP3::notify(SS7Layer2* link)
if ((link->m_checkTime > t) || (t - 2000000 > link->m_checkTime))
link->m_checkTime = t;
}
else if (link->inhibited(SS7Layer2::Inactive))
act = (unsigned int)-1;
}
else {
if (m_checklinks)
@ -1061,8 +1059,12 @@ void SS7MTP3::notify(SS7Layer2* link)
Debug(this,DebugNote,"Linkset is%s operational [%p]",
(operational() ? "" : " not"),this);
// if we became inaccessible try to uninhibit or resume all other links
const ObjList* l = 0;
// if a link became inactive or unchecked start emergency procedures
if (!m_active && (act || (m_checked < chk)))
l = &m_links;
unsigned int cnt = 0;
for (const ObjList* l = &m_links; l && !(m_active || m_inhibit); l = l->next()) {
for (; l && !(m_active || m_inhibit); l = l->next()) {
L2Pointer* p = static_cast<L2Pointer*>(l->get());
if (!p)
continue;