Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
11206c4ddf | ||
|
|
30a3abe6c5 | ||
|
|
eb34562959 | ||
|
|
fd30b495b6 | ||
|
|
48f28055e4 |
@@ -1,3 +1,11 @@
|
||||
2009-10-08 Matthew Fredrickson <creslin@digium.com>
|
||||
|
||||
* libpri 1.4.10.2 released. A bug was found which was introduced
|
||||
during the PTMP rewrite, which causes timers to not be cleared
|
||||
before being set in certain situations. This can cause the
|
||||
scheduler to be completely filled, as well as improper Q.921 link
|
||||
operation.
|
||||
|
||||
2009-04-18 Matthew Fredrickson <creslin@digium.com>
|
||||
|
||||
* libpri 1.4.10.1 released. Includes a fix for a regression found in
|
||||
|
||||
2
pri.c
2
pri.c
@@ -280,7 +280,7 @@ int pri_restart(struct pri *pri)
|
||||
{
|
||||
/* Restart Q.921 layer */
|
||||
if (pri) {
|
||||
q921_reset(pri);
|
||||
q921_reset(pri, 1);
|
||||
q921_start(pri, pri->localtype == PRI_CPE);
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -186,7 +186,7 @@ extern void q921_dump(struct pri *pri, q921_h *h, int len, int showraw, int txrx
|
||||
/* Bring up the D-channel */
|
||||
extern void q921_start(struct pri *pri, int now);
|
||||
|
||||
extern void q921_reset(struct pri *pri);
|
||||
extern void q921_reset(struct pri *pri, int reset_iqueue);
|
||||
|
||||
extern pri_event *q921_receive(struct pri *pri, q921_h *h, int len);
|
||||
|
||||
|
||||
21
q921.c
21
q921.c
@@ -785,6 +785,12 @@ void q921_dump(struct pri *pri, q921_h *h, int len, int showraw, int txrx)
|
||||
|
||||
static pri_event *q921_dchannel_up(struct pri *pri)
|
||||
{
|
||||
if (pri->tei == Q921_TEI_PRI) {
|
||||
q921_reset(pri, 1);
|
||||
} else {
|
||||
q921_reset(pri, 0);
|
||||
}
|
||||
|
||||
/* Stop any SABME retransmissions */
|
||||
if (pri->sabme_timer) {
|
||||
pri_schedule_del(pri, pri->sabme_timer);
|
||||
@@ -815,7 +821,7 @@ static pri_event *q921_dchannel_up(struct pri *pri)
|
||||
static pri_event *q921_dchannel_down(struct pri *pri)
|
||||
{
|
||||
/* Reset counters, reset sabme timer etc */
|
||||
q921_reset(pri);
|
||||
q921_reset(pri, 1);
|
||||
|
||||
/* Notify Layer 3 */
|
||||
q931_dl_indication(pri, PRI_EVENT_DCHAN_DOWN);
|
||||
@@ -825,10 +831,12 @@ static pri_event *q921_dchannel_down(struct pri *pri)
|
||||
return &pri->ev;
|
||||
}
|
||||
|
||||
void q921_reset(struct pri *pri)
|
||||
void q921_reset(struct pri *pri, int reset_iqueue)
|
||||
{
|
||||
/* Having gotten a SABME we MUST reset our entire state */
|
||||
pri->v_s = 0;
|
||||
if (reset_iqueue)
|
||||
pri->v_s = 0;
|
||||
|
||||
pri->v_a = 0;
|
||||
pri->v_r = 0;
|
||||
pri->v_na = 0;
|
||||
@@ -853,7 +861,8 @@ void q921_reset(struct pri *pri)
|
||||
pri->sentrej = 0;
|
||||
|
||||
/* Discard anything waiting to go out */
|
||||
q921_discard_retransmissions(pri);
|
||||
if (reset_iqueue)
|
||||
q921_discard_retransmissions(pri);
|
||||
}
|
||||
|
||||
static void q921_tei_release_and_reacquire(struct pri *master)
|
||||
@@ -1256,14 +1265,14 @@ static void q921_restart(struct pri *pri, int now)
|
||||
return;
|
||||
}
|
||||
/* Reset our interface */
|
||||
q921_reset(pri);
|
||||
q921_reset(pri, 1);
|
||||
/* Do the SABME XXX Maybe we should implement T_WAIT? XXX */
|
||||
q921_send_sabme(pri, now);
|
||||
}
|
||||
|
||||
void q921_start(struct pri *pri, int isCPE)
|
||||
{
|
||||
q921_reset(pri);
|
||||
q921_reset(pri, 1);
|
||||
if ((pri->sapi == Q921_SAPI_LAYER2_MANAGEMENT) && (pri->tei == Q921_TEI_GROUP)) {
|
||||
pri->q921_state = Q921_DOWN;
|
||||
if (isCPE)
|
||||
|
||||
Reference in New Issue
Block a user