[svn-commits] rmudgett: branch rmudgett/check_tei r2096 - /team/rmudgett/check_tei/q921.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Fri Nov 5 13:13:13 CDT 2010
Author: rmudgett
Date: Fri Nov 5 13:13:09 2010
New Revision: 2096
URL: http://svnview.digium.com/svn/libpri?view=rev&rev=2096
Log:
* Made q921_dump() handle repeated TEI management Ai fields.
* Added debug message when allocated last TEI.
Modified:
team/rmudgett/check_tei/q921.c
Modified: team/rmudgett/check_tei/q921.c
URL: http://svnview.digium.com/svn/libpri/team/rmudgett/check_tei/q921.c?view=diff&rev=2096&r1=2095&r2=2096
==============================================================================
--- team/rmudgett/check_tei/q921.c (original)
+++ team/rmudgett/check_tei/q921.c Fri Nov 5 13:13:09 2010
@@ -1135,19 +1135,22 @@
direction_tag,
len - 3);
break;
- };
+ }
if ((h->u.ft == 3) && (h->u.m3 == 0) && (h->u.m2 == 0) && (h->u.data[0] == 0x0f)) {
int ri;
- int tei;
-
- ri = (h->u.data[1] << 8) | h->u.data[2];
- tei = (h->u.data[4] >> 1);
- /* TEI assignment related */
+ u_int8_t *action;
+
+ /* TEI management related */
type = q921_tei_mgmt2str(h->u.data[3]);
pri_message(ctrl, "%c MDL Message: %d(%s)\n", direction_tag, h->u.data[3], type);
- pri_message(ctrl, "%c RI: %d\n", direction_tag, ri);
- pri_message(ctrl, "%c Ai: %d E:%d\n", direction_tag, (h->u.data[4] >> 1) & 0x7f, h->u.data[4] & 1);
+ ri = (h->u.data[1] << 8) | h->u.data[2];
+ pri_message(ctrl, "%c Ri: %d\n", direction_tag, ri);
+ action = &h->u.data[4];
+ for (x = len - (action - (u_int8_t *) h); 0 < x; --x, ++action) {
+ pri_message(ctrl, "%c Ai: %d E:%d\n",
+ direction_tag, (*action >> 1) & 0x7f, *action & 0x01);
+ }
}
}
@@ -1371,6 +1374,9 @@
* We just allocated the last TEI. Try to reclaim dead TEIs
* before another is requested.
*/
+ if (ctrl->debug & PRI_DEBUG_Q921_STATE) {
+ pri_message(ctrl, "Allocated last TEI. Reclaiming dead TEIs.\n");
+ }
q921_tei_check(ctrl);
}
break;
More information about the svn-commits
mailing list