From: Andreas Eversberg Date: Sat, 3 Sep 2011 13:54:37 +0000 (+0200) Subject: Fixed missing channel IE in some cases. X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=commitdiff_plain;h=590407f7f5d19e06ad41850d9e09b31c158f1bbb;hp=97aa0881beacf536e3a2296381c055887583db8f Fixed missing channel IE in some cases. NT-Mode: channel IE must be included in all cases TE-Mode: channel IE can be omitted only if any channel is requested. --- diff --git a/dss1.cpp b/dss1.cpp index c819835..1dd009e 100644 --- a/dss1.cpp +++ b/dss1.cpp @@ -2036,7 +2036,7 @@ void Pdss1::message_setup(unsigned int epoint_id, int message_id, union paramete l3m = create_l3msg(); l1l2l3_trace_header(p_m_mISDNport, this, L3_SETUP_REQ, DIRECTION_OUT); /* channel information */ - if (channel >= 0) /* it should */ + if (p_m_d_ntmode || channel != CHANNEL_ANY) /* only omit channel id in te-mode/any channel */ enc_ie_channel_id(l3m, exclusive, channel); /* caller information */ plan = 1; diff --git a/ie.cpp b/ie.cpp index ddb6c1b..e64a694 100644 --- a/ie.cpp +++ b/ie.cpp @@ -711,13 +711,15 @@ void Pdss1::enc_ie_channel_id(struct l3_msg *l3m, int exclusive, int channel) add_layer3_ie(l3m, p[0], p[1], p+2); } else { /* PRI */ - if (channel == CHANNEL_NO) /* no channel */ - return; /* IE not present */ - if (channel == CHANNEL_ANY) /* any channel */ { + if (channel == CHANNEL_NO || channel == CHANNEL_ANY) { + if (channel == CHANNEL_NO) + channel = 0; + else + channel = 3; l = 1; p[0] = IE_CHANNEL_ID; p[1] = l; - p[2] = 0x80 + 0x20 + 0x03; + p[2] = 0x80 + 0x20 + channel; add_layer3_ie(l3m, p[0], p[1], p+2); return; /* end */ }