Implemented emergency resume of other links in a linkset that become nonoperational.
The SS7 Router now emergency resumes only other linksets when it becomes isolated. git-svn-id: http://voip.null.ro/svn/yate@3526 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
19f813641b
commit
4c11257047
|
@ -973,6 +973,20 @@ void SS7MTP3::notify(SS7Layer2* link)
|
|||
if (act != m_active) {
|
||||
Debug(this,DebugNote,"Linkset is%s operational [%p]",
|
||||
(operational() ? "" : " not"),this);
|
||||
// if we became inaccessible try to resume all other links
|
||||
unsigned int cnt = 0;
|
||||
for (const ObjList* l = &m_links; l && !(m_active || m_inhibit); l = l->next()) {
|
||||
L2Pointer* p = static_cast<L2Pointer*>(l->get());
|
||||
if (!p)
|
||||
continue;
|
||||
SS7Layer2* l2 = *p;
|
||||
if ((l2 == link) || !l2)
|
||||
continue;
|
||||
cnt++;
|
||||
l2->control(SS7Layer2::Resume);
|
||||
}
|
||||
if (cnt)
|
||||
Debug(this,DebugNote,"Attempted to resume %u links [%p]",cnt,this);
|
||||
SS7Layer3::notify(link ? link->sls() : -1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -715,7 +715,7 @@ void SS7Router::sendRestart(const SS7Layer3* network)
|
|||
}
|
||||
}
|
||||
|
||||
void SS7Router::checkRoutes()
|
||||
void SS7Router::checkRoutes(const SS7Layer3* noResume)
|
||||
{
|
||||
if (m_isolate.started())
|
||||
return;
|
||||
|
@ -745,13 +745,14 @@ void SS7Router::checkRoutes()
|
|||
// we are in an emergency - uninhibit any possible link
|
||||
for (ObjList* o = m_layer3.skipNull(); o; o = o->skipNext()) {
|
||||
L3Pointer* p = static_cast<L3Pointer*>(o->get());
|
||||
if (!*p)
|
||||
SS7Layer3* l3 = *p;
|
||||
if ((l3 == noResume) || !l3)
|
||||
continue;
|
||||
NamedList* ctl = (*p)->controlCreate("resume");
|
||||
NamedList* ctl = l3->controlCreate("resume");
|
||||
if (ctl) {
|
||||
ctl->setParam("automatic",String::boolText(true));
|
||||
ctl->setParam("emergency",String::boolText(true));
|
||||
(*p)->controlExecute(ctl);
|
||||
l3->controlExecute(ctl);
|
||||
}
|
||||
if (!m_isolate.started())
|
||||
break;
|
||||
|
@ -791,7 +792,7 @@ void SS7Router::notify(SS7Layer3* network, int sls)
|
|||
}
|
||||
}
|
||||
else
|
||||
checkRoutes();
|
||||
checkRoutes(network);
|
||||
}
|
||||
// iterate and notify all user parts
|
||||
ObjList* l = &m_layer4;
|
||||
|
|
|
@ -5870,7 +5870,7 @@ private:
|
|||
void restart2();
|
||||
void disable();
|
||||
void sendRestart(const SS7Layer3* network = 0);
|
||||
void checkRoutes();
|
||||
void checkRoutes(const SS7Layer3* noResume = 0);
|
||||
int routeMSU(const SS7MSU& msu, const SS7Label& label, SS7Layer3* network, int sls, SS7Route::State states);
|
||||
bool m_checkRoutes;
|
||||
unsigned long m_rxMsu;
|
||||
|
|
Loading…
Reference in New Issue