Fix ANI2 support (bug #2788)
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@160 2fbb986a-6c06-0410-b554-c9c1f0a7f128
This commit is contained in:
parent
8ae7489b5a
commit
56dc30315b
10
q931.c
10
q931.c
@ -1501,11 +1501,11 @@ static FUNC_DUMP(dump_generic_digits)
|
||||
switch(encoding) {
|
||||
case 0: /* BCD even */
|
||||
case 1: /* BCD odd */
|
||||
pri_message("%d", ie->data[idx-2] & 0x0f);
|
||||
value = value * 10 + (ie->data[idx-2] & 0x0f);
|
||||
if(!encoding || (idx+1 < len)) { /* Special handling for BCD odd */
|
||||
pri_message("%d", (ie->data[idx-2] >> 4) & 0x0f);
|
||||
value = value * 10 + ((ie->data[idx-2] >> 4) & 0x0f);
|
||||
if(!encoding || (idx+1 < len)) { /* Special handling for BCD odd */
|
||||
pri_message("%d", ie->data[idx-2] & 0x0f);
|
||||
value = value * 10 + (ie->data[idx-2] & 0x0f);
|
||||
}
|
||||
break;
|
||||
case 2: /* IA5 */
|
||||
@ -1551,9 +1551,9 @@ static FUNC_RECV(receive_generic_digits)
|
||||
switch(encoding) {
|
||||
case 0: /* BCD even */
|
||||
case 1: /* BCD odd */
|
||||
value = value * 10 + (ie->data[idx-2] & 0x0f);
|
||||
if(!encoding || (idx+1 < len)) /* Special handling for BCD odd */
|
||||
value = value * 10 + ((ie->data[idx-2] >> 4) & 0x0f);
|
||||
if(!encoding || (idx+1 < len)) /* Special handling for BCD odd */
|
||||
value = value * 10 + (ie->data[idx-2] & 0x0f);
|
||||
break;
|
||||
case 2: /* IA5 */
|
||||
value = value * 10 + (ie->data[idx-2] - '0');
|
||||
|
Loading…
Reference in New Issue
Block a user