summaryrefslogtreecommitdiff
path: root/channels/misdn/isdn_msg_parser.c
diff options
context:
space:
mode:
authorChristian Richter <christian.richter@beronet.com>2007-11-12 13:33:13 +0000
committerChristian Richter <christian.richter@beronet.com>2007-11-12 13:33:13 +0000
commit753f223a69ebfebc5a101bf8e0ecee9ad30a306a (patch)
tree72633d24a1dab0b13f17ffef5f455ad5869524ab /channels/misdn/isdn_msg_parser.c
parent098728eb6488023a144714545bfc8dcbcee6f862 (diff)
Merged revisions 89172 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r89172 | crichter | 2007-11-12 12:23:57 +0100 (Mo, 12 Nov 2007) | 1 line added restart all interfaces Restart_Indicator, to automatically send a RESTART after the L2 of a PTP Port comes up. Also fixed some places where we have send a RELEASE without need for it. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89178 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/misdn/isdn_msg_parser.c')
-rw-r--r--channels/misdn/isdn_msg_parser.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/channels/misdn/isdn_msg_parser.c b/channels/misdn/isdn_msg_parser.c
index d05540373..720f43d0d 100644
--- a/channels/misdn/isdn_msg_parser.c
+++ b/channels/misdn/isdn_msg_parser.c
@@ -840,8 +840,13 @@ static msg_t *build_restart (struct isdn_msg msgs[], struct misdn_bchannel *bc,
#ifdef DEBUG
printf("Building RESTART Msg\n");
#endif
- enc_ie_channel_id(&restart->CHANNEL_ID, msg, 1,bc->channel, nt,bc);
- enc_ie_restart_ind(&restart->RESTART_IND, msg, 0x80, nt, bc);
+
+ if (bc->channel > 0) {
+ enc_ie_channel_id(&restart->CHANNEL_ID, msg, 1,bc->channel, nt,bc);
+ enc_ie_restart_ind(&restart->RESTART_IND, msg, 0x80, nt, bc);
+ } else {
+ enc_ie_restart_ind(&restart->RESTART_IND, msg, 0x87, nt, bc);
+ }
cb_log(0,bc->port, "Restarting channel %d\n", bc->channel);
return msg;