app_sms: Fix uninitialized values; hangup channel when REL is sent successfully
authorMatthew Jordan <mjordan@digium.com>
Sat, 19 Apr 2014 01:02:08 +0000 (01:02 +0000)
committerMatthew Jordan <mjordan@digium.com>
Sat, 19 Apr 2014 01:02:08 +0000 (01:02 +0000)
commit5427574b121f2b1d686634434a55dfd32372152f
tree4ccb29595a8a1f09b8b2c62ef47dcb376e240461
parent269bd1f545b4849aafb3221fb9d3b0ea47c6685e
app_sms: Fix uninitialized values; hangup channel when REL is sent successfully

This patch fixes two issues in app_sms:
(1) Firstly, the 'flags' field on the stack in sms_exec() is uninitialised,
    causing it to use the wrong protocol in some cases. This patch correctly
    initializes the flags fields.

(2) Secondly, when disconnect supervision is not working or
    inbanddisconnect=yes is set in chan_dahdi.conf, app_sms was failing to
    terminate the call after it sent the REL(ease) message and the peer stopped
    talking to it. This patch fixes the code to handle the 'bad stop bit'
    message more gracefully in that case, and hang up the call.

Review: https://reviewboard.asterisk.org/r/1392/

ASTERISK-18331 #close
Reported by: David Woodhouse
patches:
  asterisk-fix-sms.patch uploaded by David Woodhouse (License 5754)
........

Merged revisions 412655 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: http://svn.asterisk.org/svn/asterisk/branches/11@412656 f38db490-d61c-443f-a65b-d21fe96a405b
apps/app_sms.c