diff options
Diffstat (limited to 'channels/misdn/isdn_msg_parser.c')
-rw-r--r-- | channels/misdn/isdn_msg_parser.c | 9 |
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; |