Prevent a crash in ExternalIVR when the 'S' command is sent first.
authorSean Bright <sean@malleable.com>
Thu, 19 Apr 2012 16:10:04 +0000 (16:10 +0000)
committerSean Bright <sean@malleable.com>
Thu, 19 Apr 2012 16:10:04 +0000 (16:10 +0000)
commitba93541cedf29837f8fe485ebb3a5a2c06499693
tree4cac94280844f5d32697976260351688277c53b9
parent772ad8a641f281b81bfab9a118f6cfb1a3b4b4c4
Prevent a crash in ExternalIVR when the 'S' command is sent first.

If the first command sent from an ExternalIVR client is an 'S' command, we were
blindly removing the first element from the play list and deferencing it, even
if it was NULL.  This corrects that and also locks appropriately in one place.

(issue ASTERISK-17889)
Reported by: Chris Maciejewski
........

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

Merged revisions 362587 from http://svn.asterisk.org/svn/asterisk/branches/10

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362588 65c4cc65-6c06-0410-ace0-fbb531ad65f3
apps/app_externalivr.c