chan_ss7: limit opc and dpc to 14 bits?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

	We have found an issue while using chan_ss7 we cannot use values above 0x3fff 
for opc and dpc.
	The coresponding lines of code say (in mtp.c)

if(peerpc(m) < 0 || peerpc(m) >= (1<<14)) {
	ast_log(LOG_ERROR, "Invalid value 0x%x for peerpc.\n", peerpc(m));

	Allthough we have quickly patched this, we have found that the entire code in 
mtp.c is organized for a maximum of 14 bits of processing (as the following 
code from the same mtp.c shows):

void mtp3_put_label(int sls, int opc, int dpc, unsigned char *buf) {
  buf[0] = dpc & 0xff;
  buf[1] = ((dpc & 0x3f00) >> 8) | ((opc & 0x0003) << 6);
  buf[2] = ((opc & 0x03fc) >> 2);
  buf[3] = ((opc & 0x3c00) >> 10) | (sls << 4);
}

	Any ideas of the reason behind this limit?
	
Thanks,
-- 
Cristian Dimache



[Index of Archives]     [Asterisk App Development]     [PJ SIP]     [Gnu Gatekeeper]     [IETF Sipping]     [Info Cyrus]     [ALSA User]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite Backpacking]     [Deep Creek Hot Springs]     [Yosemite Campsites]     [ISDN Cause Codes]     [Asterisk Books]

  Powered by Linux