Always use the Inactive flag to track if CBD or COO must be sent.
Added more inhibit flags related debugging. git-svn-id: http://yate.null.ro/svn/yate/trunk@3582 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
dcbbf7aaaf
commit
ca8d2fa71e
|
@ -846,7 +846,7 @@ bool SS7MTP3::initialize(const NamedList* config)
|
|||
if (linkSls >= 0)
|
||||
link->sls(linkSls);
|
||||
if (m_checklinks)
|
||||
link->inhibit(SS7Layer2::Unchecked);
|
||||
link->inhibit(SS7Layer2::Unchecked|SS7Layer2::Inactive);
|
||||
attach(link);
|
||||
if (!link->initialize(linkConfig))
|
||||
detach(link);
|
||||
|
@ -967,16 +967,16 @@ bool SS7MTP3::receivedMSU(const SS7MSU& msu, SS7Layer2* link, int sls)
|
|||
if (!maint)
|
||||
return false;
|
||||
if (label.sls() == sls) {
|
||||
Debug(this,DebugNote,"Placing link %d '%s' in service [%p]",
|
||||
sls,link->toString().c_str(),this);
|
||||
Debug(this,DebugNote,"Placing link %d '%s' in service, inhibitions 0x%02X [%p]",
|
||||
sls,link->toString().c_str(),link->inhibited(),this);
|
||||
link->m_inhibited &= ~SS7Layer2::Unchecked;
|
||||
notify(link);
|
||||
}
|
||||
}
|
||||
if (!maint && (msu.getSIF() != SS7MSU::SNM) &&
|
||||
link->inhibited(SS7Layer2::Unchecked|SS7Layer2::Inactive|SS7Layer2::Local)) {
|
||||
Debug(this,DebugMild,"Received MSU on inhibited link %d '%s' [%p]",
|
||||
sls,link->toString().c_str(),this);
|
||||
Debug(this,DebugMild,"Received MSU on inhibited 0x%02X link %d '%s' [%p]",
|
||||
link->inhibited(),sls,link->toString().c_str(),this);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -741,13 +741,13 @@ void SS7Management::notify(SS7Layer3* network, int sls)
|
|||
{
|
||||
Debug(this,DebugAll,"SS7Management::notify(%p,%d) [%p]",network,sls,this);
|
||||
if (network && (sls >= 0)) {
|
||||
if (network->inhibited(sls,SS7Layer2::Unchecked))
|
||||
return;
|
||||
DDebug(this,DebugInfo,"Link %d inhibitions: 0x%02X [%p]",
|
||||
sls,network->inhibited(sls),this);
|
||||
bool linkUp = network->operational(sls);
|
||||
if (linkUp && !network->inhibited(sls,SS7Layer2::Inactive))
|
||||
if (linkUp != network->inhibited(sls,SS7Layer2::Inactive))
|
||||
return;
|
||||
bool linkAvail[256];
|
||||
bool activate = linkUp;
|
||||
bool force = true;
|
||||
int txSls;
|
||||
for (txSls = 0; txSls < 256; txSls++)
|
||||
linkAvail[txSls] = (txSls != sls) && !network->inhibited(txSls) && network->operational(txSls);
|
||||
|
@ -808,7 +808,7 @@ void SS7Management::notify(SS7Layer3* network, int sls)
|
|||
}
|
||||
ctl->setParam("automatic",String::boolText(true));
|
||||
controlExecute(ctl);
|
||||
activate = false;
|
||||
force = false;
|
||||
}
|
||||
while (seq >= 0) {
|
||||
// scan pending list for matching ECA, turn them into COA/XCA
|
||||
|
@ -842,6 +842,7 @@ void SS7Management::notify(SS7Layer3* network, int sls)
|
|||
ctl->setParam("sequence",String(seq));
|
||||
ctl->setParam("automatic",String::boolText(true));
|
||||
controlExecute(ctl);
|
||||
force = false;
|
||||
}
|
||||
TelEngine::destruct(pend);
|
||||
}
|
||||
|
@ -851,9 +852,15 @@ void SS7Management::notify(SS7Layer3* network, int sls)
|
|||
}
|
||||
}
|
||||
}
|
||||
if (activate) {
|
||||
Debug(this,DebugWarn,"Could not send CBD for link %d, activating anyway [%p]",sls,this);
|
||||
network->inhibit(sls,0,SS7Layer2::Inactive);
|
||||
if (force) {
|
||||
if (linkUp) {
|
||||
Debug(this,DebugWarn,"Could not changeback link %d, activating anyway [%p]",sls,this);
|
||||
network->inhibit(sls,0,SS7Layer2::Inactive);
|
||||
}
|
||||
else {
|
||||
Debug(this,DebugWarn,"Could not changeover link %d, deactivating anyway [%p]",sls,this);
|
||||
network->inhibit(sls,SS7Layer2::Inactive,0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue