freetdm: fixed cgu/cgb commands wrongly setting cic status when
the range covers one or more signaling links
This commit is contained in:
parent
b78b612b47
commit
7b3a3d86b9
|
@ -2415,9 +2415,7 @@ ftdm_status_t handle_cgb_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
|
||||||
else {
|
else {
|
||||||
if (extract_chan_data(x, &sngss7_info, &ftdmchan)) {
|
if (extract_chan_data(x, &sngss7_info, &ftdmchan)) {
|
||||||
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", x);
|
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", x);
|
||||||
break;
|
} else {
|
||||||
}
|
|
||||||
|
|
||||||
ftdm_mutex_lock(ftdmchan->mutex);
|
ftdm_mutex_lock(ftdmchan->mutex);
|
||||||
if (status[byte] & (1 << bit)) {
|
if (status[byte] & (1 << bit)) {
|
||||||
switch (blockType) {
|
switch (blockType) {
|
||||||
|
@ -2452,6 +2450,7 @@ ftdm_status_t handle_cgb_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
|
||||||
bit = 0;
|
bit = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
x++;
|
x++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2616,7 +2615,10 @@ ftdm_status_t handle_cgu_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
|
||||||
loop_range++;
|
loop_range++;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* lock the channel */
|
if (extract_chan_data(x, &sngss7_info, &ftdmchan)) {
|
||||||
|
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", x);
|
||||||
|
}
|
||||||
|
else {
|
||||||
ftdm_mutex_lock(ftdmchan->mutex);
|
ftdm_mutex_lock(ftdmchan->mutex);
|
||||||
|
|
||||||
if (status[byte] & (1 << bit)) {
|
if (status[byte] & (1 << bit)) {
|
||||||
|
@ -2650,7 +2652,6 @@ ftdm_status_t handle_cgu_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
|
||||||
sngss7_set_sig_status(sngss7_info, FTDM_SIG_STATE_UP);
|
sngss7_set_sig_status(sngss7_info, FTDM_SIG_STATE_UP);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* unlock the channel again before we exit */
|
|
||||||
ftdm_mutex_unlock(ftdmchan->mutex);
|
ftdm_mutex_unlock(ftdmchan->mutex);
|
||||||
|
|
||||||
/* update the bit and byte counter*/
|
/* update the bit and byte counter*/
|
||||||
|
@ -2660,6 +2661,7 @@ ftdm_status_t handle_cgu_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
|
||||||
bit = 0;
|
bit = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
x++;
|
x++;
|
||||||
}
|
}
|
||||||
#if 0
|
#if 0
|
||||||
|
|
Loading…
Reference in New Issue