message: Don't close an AMI connection on SendMessage action error
authorMatthew Jordan <mjordan@digium.com>
Mon, 6 Oct 2014 18:39:54 +0000 (18:39 +0000)
committerMatthew Jordan <mjordan@digium.com>
Mon, 6 Oct 2014 18:39:54 +0000 (18:39 +0000)
commit39bd5b7a7020567eef0317786cb543ceb65467a9
tree6b01a55e5d4942c6ceb0c9f8da4e553d89dffc59
parentc384532aa44717c20ebbe16cca558fc45f90f139
message: Don't close an AMI connection on SendMessage action error

If SendMessage encounters an error (such as incorrect input provided to the
action), it will currently return -1. Actions should only return -1 if the
connection to the AMI client should be closed. In this case, SendMessage
causing the client to disconnect is inappropriate.

This patch causes the action to return 0, which simply causes the action to
fail.

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

ASTERISK-24354 #close
Reported by: Peter Katzmann
patches:
  sendMessage.patch uploaded by Peter Katzmann (License 5968)
........

Merged revisions 424690 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 424691 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424692 from http://svn.asterisk.org/svn/asterisk/branches/13

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424693 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/message.c