Make IE debug more consistent and readable. (#7559)
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@366 2fbb986a-6c06-0410-b554-c9c1f0a7f128
This commit is contained in:
parent
9037525b7b
commit
9969553056
9
q931.c
9
q931.c
@ -418,7 +418,7 @@ static FUNC_DUMP(dump_channel_id)
|
||||
"No channel selected", "As indicated in following octets", "Reserved","Any channel selected"
|
||||
};
|
||||
|
||||
pri_message(pri, "%c Channel ID (len=%2d) [ Ext: %d IntID: %s, %s Spare: %d, %s Dchan: %d\n",
|
||||
pri_message(pri, "%c Channel ID (len=%2d) [ Ext: %d IntID: %s %s Spare: %d %s Dchan: %d\n",
|
||||
prefix, len, (ie->data[0] & 0x80) ? 1 : 0, (ie->data[0] & 0x40) ? "Explicit" : "Implicit",
|
||||
(ie->data[0] & 0x20) ? "PRI" : "Other", (ie->data[0] & 0x10) ? 1 : 0,
|
||||
(ie->data[0] & 0x08) ? "Exclusive" : "Preferred", (ie->data[0] & 0x04) ? 1 : 0);
|
||||
@ -1560,7 +1560,7 @@ static char *pri_causeclass2str(int cause)
|
||||
static FUNC_DUMP(dump_cause)
|
||||
{
|
||||
int x;
|
||||
pri_message(pri, "%c Cause (len=%2d) [ Ext: %d Coding: %s (%d) 0: %d Location: %s (%d)\n",
|
||||
pri_message(pri, "%c Cause (len=%2d) [ Ext: %d Coding: %s (%d) Spare: %d Location: %s (%d)\n",
|
||||
prefix, len, ie->data[0] >> 7, coding2str((ie->data[0] & 0x60) >> 5), (ie->data[0] & 0x60) >> 5,
|
||||
(ie->data[0] & 0x10) >> 4, loc2str(ie->data[0] & 0xf), ie->data[0] & 0xf);
|
||||
pri_message(pri, "%c Ext: %d Cause: %s (%d), class = %s (%d) ]\n",
|
||||
@ -3106,6 +3106,7 @@ int q931_receive(struct pri *pri, q931_h *h, int len)
|
||||
case Q931_PROGRESS:
|
||||
c->useruserinfo[0] = '\0';
|
||||
c->cause = -1;
|
||||
/* Fall through */
|
||||
case Q931_CALL_PROCEEDING:
|
||||
c->progress = -1;
|
||||
c->progressmask = 0;
|
||||
@ -3131,6 +3132,7 @@ int q931_receive(struct pri *pri, q931_h *h, int len)
|
||||
pri_schedule_del(pri, c->retranstimer);
|
||||
c->retranstimer = 0;
|
||||
c->useruserinfo[0] = '\0';
|
||||
/* Fall through */
|
||||
case Q931_STATUS:
|
||||
c->cause = -1;
|
||||
c->causecode = -1;
|
||||
@ -3168,12 +3170,13 @@ int q931_receive(struct pri *pri, q931_h *h, int len)
|
||||
pri_error(pri, "!! Not yet handling pre-handle message type %s (%d)\n", msg2str(mh->msg), mh->msg);
|
||||
/* Fall through */
|
||||
default:
|
||||
pri_error(pri, "!! Don't know how to post-handle message type %s (%d)\n", msg2str(mh->msg), mh->msg);
|
||||
pri_error(pri, "!! Don't know how to pre-handle message type %s (%d)\n", msg2str(mh->msg), mh->msg);
|
||||
q931_status(pri,c, PRI_CAUSE_MESSAGE_TYPE_NONEXIST);
|
||||
if (c->newcall)
|
||||
q931_destroycall(pri,c->cr);
|
||||
return -1;
|
||||
}
|
||||
/* Handle IEs */
|
||||
memset(mandies, 0, sizeof(mandies));
|
||||
missingmand = 0;
|
||||
for (x=0;x<sizeof(msgs) / sizeof(msgs[0]); x++) {
|
||||
|
Loading…
Reference in New Issue
Block a user