HACK: various debug statements / local changes

This commit is contained in:
Harald Welte 2022-03-08 08:28:44 +01:00
parent 677ecb0b38
commit f186162ba0
1 changed files with 12 additions and 4 deletions

View File

@ -1821,11 +1821,13 @@ bool ISDNQ931Call::reserveCircuit()
anyCircuit = true;
else
m_data.m_channels = briChan;
Debug(q931(),DebugNote, "Incoming BRI");
break;
}
// Outgoing calls
if (!m_data.m_channelByNumber) {
m_data.m_reason = "service-not-implemented";
Debug(q931(),DebugNote, "Outgoing Call");
return false;
}
int reqCircuit = m_data.m_channels.toInteger(-1);
@ -1833,15 +1835,21 @@ bool ISDNQ931Call::reserveCircuit()
if (!m_circuit) {
anyCircuit = (outgoing() || (reqCircuit < 0 && !m_data.m_channelMandatory)) &&
(m_net || q931()->primaryRate());
Debug(q931(),DebugNote, "Any Circuit");
break;
}
};
// Check the received circuit if any
if ((int)m_circuit->code() == reqCircuit)
if ((int)m_circuit->code() == reqCircuit) {
Debug(q931(),DebugNote, "circuit == requested");
return true;
}
// We already have a circuit and received a different one: force mandatory
m_data.m_channelMandatory = true;
Debug(q931(),DebugNote, "force mandatory");
break;
}
Debug(q931(),DebugNote, "Now actually reserving");
// Reserve the circuit
m_circuitChange = true;
if (anyCircuit)
@ -1866,11 +1874,11 @@ bool ISDNQ931Call::reserveCircuit()
Debug(q931(),level,"Call(%u,%u). Connected to circuit %u in %u ms [%p]",
Q931_CALL_ID,m_circuit->code(),(unsigned int)t,this);
}
#ifdef DEBUG
//#ifdef DEBUG
else
Debug(q931(),DebugAll,"Call(%u,%u). Connected to circuit %u in %u ms [%p]",
Q931_CALL_ID,m_circuit->code(),(unsigned int)t,this);
#endif
//#endif
return true;
}
DDebug(q931(),DebugNote,