Removed span's D-channel flag. Use the first span to process ISDN restart requests for single interfaces.
git-svn-id: http://voip.null.ro/svn/yate@1851 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
b3edf00362
commit
82cd1fc27a
|
@ -2883,7 +2883,7 @@ void ISDNQ931::processMsgRestart(ISDNQ931Message* msg)
|
|||
break;
|
||||
}
|
||||
|
||||
// Terminate all calls if all-interfaces is specified
|
||||
// Terminate all calls if class is 'all-interfaces'
|
||||
if (all) {
|
||||
terminateCalls(0,"resource-unavailable");
|
||||
break;
|
||||
|
@ -2901,16 +2901,15 @@ void ISDNQ931::processMsgRestart(ISDNQ931Message* msg)
|
|||
if (cic)
|
||||
span = cic->span();
|
||||
}
|
||||
else
|
||||
for (ObjList* o = circuits()->m_spans.skipNull(); o; o = o->skipNext()) {
|
||||
SignallingCircuitSpan* s = static_cast<SignallingCircuitSpan*>(o->get());
|
||||
if (s->hasDChan()) {
|
||||
span = s;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
// FIXME: Make a proper implementation: identify the span containing the active D-channel
|
||||
// Use the first span
|
||||
ObjList* o = circuits()->m_spans.skipNull();
|
||||
if (o)
|
||||
span = static_cast<SignallingCircuitSpan*>(o->get());
|
||||
}
|
||||
if (span) {
|
||||
// Fill a list with all circuits code used to trminate calls
|
||||
// Fill a list with all circuit codes used to reset and terminate calls
|
||||
ObjList m_terminate;
|
||||
for (ObjList* o = circuits()->circuits().skipNull(); o; o = o->skipNext()) {
|
||||
SignallingCircuit* cic = static_cast<SignallingCircuit*>(o->get());
|
||||
|
|
|
@ -910,11 +910,9 @@ void SignallingCircuitGroup::clearAll()
|
|||
/**
|
||||
* SignallingCircuitSpan
|
||||
*/
|
||||
SignallingCircuitSpan::SignallingCircuitSpan(const char* id,
|
||||
SignallingCircuitGroup* group, bool dChan)
|
||||
SignallingCircuitSpan::SignallingCircuitSpan(const char* id, SignallingCircuitGroup* group)
|
||||
: m_group(group),
|
||||
m_id(id),
|
||||
m_dChan(dChan)
|
||||
m_id(id)
|
||||
{
|
||||
if (m_group)
|
||||
m_group->insertSpan(this);
|
||||
|
|
|
@ -1783,30 +1783,14 @@ public:
|
|||
* Constructor
|
||||
* @param id Optional span id
|
||||
* @param group Optional circuit group owning the span's circuits
|
||||
* @param dChan Indicates whether this span contains a D-channel or not
|
||||
*/
|
||||
SignallingCircuitSpan(const char* id = 0, SignallingCircuitGroup* group = 0,
|
||||
bool dChan = false);
|
||||
SignallingCircuitSpan(const char* id = 0, SignallingCircuitGroup* group = 0);
|
||||
|
||||
/**
|
||||
* Destructor. Remove from group's queue
|
||||
*/
|
||||
virtual ~SignallingCircuitSpan();
|
||||
|
||||
/**
|
||||
* Check if this span contains a D-channel
|
||||
* @return True if this span contains a D-channel
|
||||
*/
|
||||
inline bool hasDChan() const
|
||||
{ return m_dChan; }
|
||||
|
||||
/**
|
||||
* Set this span D-channel's flag
|
||||
* @param dChan True if this span contains a D-channel, false otherwise
|
||||
*/
|
||||
inline void setDChan(bool dChan)
|
||||
{ m_dChan = dChan; }
|
||||
|
||||
/**
|
||||
* Get the owner of this span
|
||||
* @return SignallingCircuitGroup pointer or 0
|
||||
|
@ -1829,7 +1813,6 @@ protected:
|
|||
|
||||
private:
|
||||
String m_id; // Span's id
|
||||
bool m_dChan; // True if this span contains a D-channel
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue