|
|
|
@ -186,7 +186,7 @@ static int q921_transmit(struct pri *ctrl, q921_h *h, int len)
|
|
|
|
|
ctrl->q921_txcount++;
|
|
|
|
|
/* Just send it raw */
|
|
|
|
|
if (ctrl->debug & (PRI_DEBUG_Q921_DUMP | PRI_DEBUG_Q921_RAW))
|
|
|
|
|
q921_dump(ctrl, h, len, ctrl->debug & PRI_DEBUG_Q921_RAW, 1);
|
|
|
|
|
q921_dump(ctrl, h, len, ctrl->debug, 1);
|
|
|
|
|
/* Write an extra two bytes for the FCS */
|
|
|
|
|
res = ctrl->write_func ? ctrl->write_func(ctrl, h, len + 2) : 0;
|
|
|
|
|
if (res != (len + 2)) {
|
|
|
|
@ -1187,7 +1187,7 @@ static void q921_dump_iqueue_info(struct q921_link *link)
|
|
|
|
|
|
|
|
|
|
static void q921_dump_pri_by_h(struct pri *ctrl, char direction_tag, q921_h *h);
|
|
|
|
|
|
|
|
|
|
void q921_dump(struct pri *ctrl, q921_h *h, int len, int showraw, int txrx)
|
|
|
|
|
void q921_dump(struct pri *ctrl, q921_h *h, int len, int debugflags, int txrx)
|
|
|
|
|
{
|
|
|
|
|
int x;
|
|
|
|
|
const char *type;
|
|
|
|
@ -1196,9 +1196,11 @@ void q921_dump(struct pri *ctrl, q921_h *h, int len, int showraw, int txrx)
|
|
|
|
|
direction_tag = txrx ? '>' : '<';
|
|
|
|
|
|
|
|
|
|
pri_message(ctrl, "\n");
|
|
|
|
|
if (debugflags & PRI_DEBUG_Q921_DUMP) {
|
|
|
|
|
q921_dump_pri_by_h(ctrl, direction_tag, h);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (showraw) {
|
|
|
|
|
if (debugflags & PRI_DEBUG_Q921_RAW) {
|
|
|
|
|
char *buf = malloc(len * 3 + 1);
|
|
|
|
|
int buflen = 0;
|
|
|
|
|
if (buf) {
|
|
|
|
@ -1209,6 +1211,7 @@ void q921_dump(struct pri *ctrl, q921_h *h, int len, int showraw, int txrx)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (debugflags & PRI_DEBUG_Q921_DUMP) {
|
|
|
|
|
switch (h->h.data[0] & Q921_FRAMETYPE_MASK) {
|
|
|
|
|
case 0:
|
|
|
|
|
case 2:
|
|
|
|
@ -1338,6 +1341,7 @@ void q921_dump(struct pri *ctrl, q921_h *h, int len, int showraw, int txrx)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void q921_dump_pri(struct q921_link *link, char direction_tag)
|
|
|
|
|
{
|
|
|
|
@ -3006,7 +3010,7 @@ static pri_event *__q921_receive(struct pri *ctrl, q921_h *h, int len)
|
|
|
|
|
len -= 2;
|
|
|
|
|
|
|
|
|
|
if (ctrl->debug & (PRI_DEBUG_Q921_DUMP | PRI_DEBUG_Q921_RAW)) {
|
|
|
|
|
q921_dump(ctrl, h, len, ctrl->debug & PRI_DEBUG_Q921_RAW, 0);
|
|
|
|
|
q921_dump(ctrl, h, len, ctrl->debug, 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Check some reject conditions -- Start by rejecting improper ea's */
|
|
|
|
|