[svn-commits] rmudgett: branch 1.4 r1511 - in /branches/1.4: pri.c pri_internal.h q921.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Tue Mar 2 17:47:18 CST 2010
Author: rmudgett
Date: Tue Mar 2 17:47:12 2010
New Revision: 1511
URL: http://svnview.digium.com/svn/libpri?view=rev&rev=1511
Log:
Restore ability to change the Q.921 K value.
The Q.921 rewrite only used value of PRI_TIMER_K right after it was set to
the default. The Q.921 window size was thus no longer alterable by the
user.
(closes issue #16909)
Reported by: alecdavis
Patches:
pritimer.libpri.diff.txt uploaded by alecdavis (license 585)
Tested by: alecdavis
Modified:
branches/1.4/pri.c
branches/1.4/pri_internal.h
branches/1.4/q921.c
Modified: branches/1.4/pri.c
URL: http://svnview.digium.com/svn/libpri/branches/1.4/pri.c?view=diff&rev=1511&r1=1510&r2=1511
==============================================================================
--- branches/1.4/pri.c (original)
+++ branches/1.4/pri.c Tue Mar 2 17:47:12 2010
@@ -349,7 +349,6 @@
default:
break;
}
- p->k = p->timers[PRI_TIMER_K];
if (p->tei == Q921_TEI_GROUP && p->sapi == Q921_SAPI_LAYER2_MANAGEMENT && p->localtype == PRI_CPE) {
p->subchannel = __pri_new_tei(-1, p->localtype, p->switchtype, p, NULL, NULL, NULL, Q921_TEI_PRI, 1);
@@ -1320,8 +1319,8 @@
used = pri_snprintf(buf, used, buf_size, "Q921 Outstanding: %u\n", q921outstanding);
#endif
#if 0
- used = pri_snprintf(buf, used, buf_size, "Window Length: %d/%d\n", ctrl->k,
- ctrl->window);
+ used = pri_snprintf(buf, used, buf_size, "Window Length: %d/%d\n",
+ ctrl->timers[PRI_TIMER_K], ctrl->window);
used = pri_snprintf(buf, used, buf_size, "Sentrej: %d\n", ctrl->sentrej);
used = pri_snprintf(buf, used, buf_size, "SolicitFbit: %d\n", ctrl->solicitfbit);
used = pri_snprintf(buf, used, buf_size, "Retrans: %d\n", ctrl->retrans);
Modified: branches/1.4/pri_internal.h
URL: http://svnview.digium.com/svn/libpri/branches/1.4/pri_internal.h?view=diff&rev=1511&r1=1510&r2=1511
==============================================================================
--- branches/1.4/pri_internal.h (original)
+++ branches/1.4/pri_internal.h Tue Mar 2 17:47:12 2010
@@ -97,7 +97,6 @@
/* Q.921 State */
int q921_state;
- int k;
int RC;
int peer_rx_busy:1;
int own_rx_busy:1;
Modified: branches/1.4/q921.c
URL: http://svnview.digium.com/svn/libpri/branches/1.4/q921.c?view=diff&rev=1511&r1=1510&r2=1511
==============================================================================
--- branches/1.4/q921.c (original)
+++ branches/1.4/q921.c Tue Mar 2 17:47:12 2010
@@ -327,18 +327,18 @@
struct q921_frame *f;
int frames_txd = 0;
- if (pri->peer_rx_busy || (pri->v_s == Q921_ADD(pri->v_a, pri->k))) {
+ if (pri->peer_rx_busy || (pri->v_s == Q921_ADD(pri->v_a, pri->timers[PRI_TIMER_K]))) {
if (pri->debug & PRI_DEBUG_Q921_DUMP)
pri_message(pri, "Couldn't transmit I frame at this time due to peer busy condition or window shut\n");
return 0;
}
f = pri->txqueue;
- while (f && (pri->v_s != Q921_ADD(pri->v_a, pri->k))) {
+ while (f && (pri->v_s != Q921_ADD(pri->v_a, pri->timers[PRI_TIMER_K]))) {
if (!f->transmitted) {
/* Send it now... */
if (pri->debug & PRI_DEBUG_Q921_DUMP)
- pri_message(pri, "-- Finally transmitting %d, since window opened up (%d)\n", f->h.n_s, pri->k);
+ pri_message(pri, "-- Finally transmitting %d, since window opened up (%d)\n", f->h.n_s, pri->timers[PRI_TIMER_K]);
f->transmitted++;
f->h.n_s = pri->v_s;
f->h.n_r = pri->v_r;
@@ -613,7 +613,7 @@
return 0;
}
- if (pri->peer_rx_busy || (pri->v_s == Q921_ADD(pri->v_a, pri->k))) {
+ if (pri->peer_rx_busy || (pri->v_s == Q921_ADD(pri->v_a, pri->timers[PRI_TIMER_K]))) {
if (pri->debug & PRI_DEBUG_Q921_DUMP)
pri_message(pri, "Couldn't transmit I frame at this time due to peer busy condition or window shut\n");
return 0;
@@ -850,7 +850,7 @@
{
pri_message(pri, "TEI: %d State %d\n", pri->tei, pri->q921_state);
pri_message(pri, "V(S) %d V(A) %d V(R) %d\n", pri->v_s, pri->v_a, pri->v_r);
- pri_message(pri, "K %d, RC %d, l3initiated %d, reject_except %d ack_pend %d\n", pri->k, pri->RC, pri->l3initiated, pri->reject_exception, pri->acknowledge_pending);
+ pri_message(pri, "K %d, RC %d, l3initiated %d, reject_except %d ack_pend %d\n", pri->timers[PRI_TIMER_K], pri->RC, pri->l3initiated, pri->reject_exception, pri->acknowledge_pending);
pri_message(pri, "T200 %d, N200 %d, T203 %d\n", pri->t200_timer, 3, pri->t203_timer);
}
More information about the svn-commits
mailing list