Compare commits

..

5 Commits

Author SHA1 Message Date
Matthew Fredrickson
11206c4ddf git-svn-id: https://origsvn.digium.com/svn/libpri/tags/1.4.10.2@1165 2fbb986a-6c06-0410-b554-c9c1f0a7f128 2009-10-08 19:58:50 +00:00
Matthew Fredrickson
30a3abe6c5 Update .version file and Changelog correctly this time...
git-svn-id: https://origsvn.digium.com/svn/libpri/tags/1.4.10.2@1164 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-10-08 19:56:28 +00:00
Matthew Fredrickson
eb34562959 This fix is more like the fix that was used to resolve the issue for the PRI case
git-svn-id: https://origsvn.digium.com/svn/libpri/tags/1.4.10.2@1144 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-09-29 15:32:23 +00:00
Matthew Fredrickson
fd30b495b6 Changes for 1.4.10.2
git-svn-id: https://origsvn.digium.com/svn/libpri/tags/1.4.10.2@1143 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-09-28 19:07:01 +00:00
Matthew Fredrickson
48f28055e4 git-svn-id: https://origsvn.digium.com/svn/libpri/tags/1.4.10.2@1142 2fbb986a-6c06-0410-b554-c9c1f0a7f128 2009-09-28 18:52:56 +00:00
5 changed files with 26 additions and 9 deletions

View File

@@ -1 +1 @@
1.4.10.1
1.4.10.2

View File

@@ -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
View File

@@ -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;

View File

@@ -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
View File

@@ -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)