summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2011-08-09 23:17:13 +0000
committerRichard Mudgett <rmudgett@digium.com>2011-08-09 23:17:13 +0000
commitb99b1116be609fa4a614bf3ab5301fef3d74da0c (patch)
tree43e6a5dbb777a4f5bcfc064893a65da9cb161d92 /apps
parent1626b29f6faf09b4655c2695a3cf89afc0c72bda (diff)
Merged revisions 331265 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r331265 | rmudgett | 2011-08-09 18:12:49 -0500 (Tue, 09 Aug 2011) | 22 lines Merged revisions 331248 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r331248 | rmudgett | 2011-08-09 17:12:59 -0500 (Tue, 09 Aug 2011) | 15 lines Misc minor items found in code. * Add some reentrancy protection in pbx.c when creating the contexts_table hash table. * Fix inverted test in chan_sip.c conditional code. * Fix uninitialized variable and use of the wrong variable in chan_iax2.c. * Fix test of return value in app_parkandannounce.c. Explicitly testing for -1 is bad if the function does not actually return that value when it fails. * Fixup some comments and add some curly braces in features.c. ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@331266 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rw-r--r--apps/app_parkandannounce.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/app_parkandannounce.c b/apps/app_parkandannounce.c
index 70633745b..7338efb98 100644
--- a/apps/app_parkandannounce.c
+++ b/apps/app_parkandannounce.c
@@ -152,7 +152,9 @@ static int parkandannounce_exec(struct ast_channel *chan, const char *data)
before we are done announcing and the channel is messed with, Kablooeee. So we use Masq to prevent this. */
res = ast_masq_park_call(chan, NULL, timeout, &lot);
- if (res == -1) {
+ if (res) {
+ /* Parking failed. */
+ res = -1;
goto parkcleanup;
}