aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-12-21 17:11:19 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-12-21 17:11:19 +0000
commit53f5a2c86828e49e7d452a9c453719b4f6b94fc0 (patch)
tree1a7dbba0f8d0cd200d4ff6f867725ef02136f85b
parentcc1ad279ce8f44063c0c06ed80b071f5bb5fd142 (diff)
Merged revisions 235822 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r235822 | tilghman | 2009-12-21 11:00:46 -0600 (Mon, 21 Dec 2009) | 15 lines Merged revisions 235821 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r235821 | tilghman | 2009-12-21 10:45:03 -0600 (Mon, 21 Dec 2009) | 8 lines Send parking lot announcement to the channel which parked the call, not the park-ee. (closes issue #16234) Reported by: yeshuawatso Patches: 20091210__issue16234.diff.txt uploaded by tilghman (license 14) 20091221__issue16234__1.4.diff.txt uploaded by tilghman (license 14) Tested by: yeshuawatso ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@235825 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--main/features.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/main/features.c b/main/features.c
index 4eaf87ccd..da4b771f4 100644
--- a/main/features.c
+++ b/main/features.c
@@ -508,10 +508,10 @@ static struct parkeduser *park_space_reserve(struct ast_channel *chan,
ast_log(LOG_DEBUG, "Found chanvar Parkinglot: %s\n", parkinglotname);
parkinglot = find_parkinglot(parkinglotname);
}
- if (!parkinglot)
- parkinglot = default_parkinglot;
+ if (!parkinglot) {
+ parkinglot = parkinglot_addref(default_parkinglot);
+ }
- parkinglot_addref(parkinglot);
if (option_debug)
ast_log(LOG_DEBUG, "Parkinglot: %s\n", parkinglot->name);
@@ -525,7 +525,7 @@ static struct parkeduser *park_space_reserve(struct ast_channel *chan,
AST_LIST_LOCK(&parkinglot->parkings);
/* Check for channel variable PARKINGEXTEN */
ast_channel_lock(chan);
- parkingexten = pbx_builtin_getvar_helper(chan, "PARKINGEXTEN");
+ parkingexten = ast_strdupa(S_OR(pbx_builtin_getvar_helper(chan, "PARKINGEXTEN"), ""));
ast_channel_unlock(chan);
if (!ast_strlen_zero(parkingexten)) {
/*!\note The API forces us to specify a numeric parking slot, even
@@ -544,10 +544,10 @@ static struct parkeduser *park_space_reserve(struct ast_channel *chan,
snprintf(pu->parkingexten, sizeof(pu->parkingexten), "%d", parking_space);
if (ast_exists_extension(NULL, parkinglot->parking_con, pu->parkingexten, 1, NULL)) {
+ ast_log(LOG_WARNING, "Requested parking extension already exists: %s@%s\n", parkingexten, parkinglot->parking_con);
AST_LIST_UNLOCK(&parkinglot->parkings);
parkinglot_unref(parkinglot);
ast_free(pu);
- ast_log(LOG_WARNING, "Requested parking extension already exists: %s@%s\n", parkingexten, parkinglot->parking_con);
return NULL;
}
} else {
@@ -596,7 +596,7 @@ static struct parkeduser *park_space_reserve(struct ast_channel *chan,
pu->notquiteyet = 1;
pu->parkingnum = parking_space;
- pu->parkinglot = parkinglot;
+ pu->parkinglot = parkinglot_addref(parkinglot);
AST_LIST_INSERT_TAIL(&parkinglot->parkings, pu, list);
parkinglot_unref(parkinglot);
@@ -801,7 +801,7 @@ static int masq_park_call(struct ast_channel *rchan, struct ast_channel *peer, i
}
if (!play_announcement && args == &park_args) {
- args->orig_chan_name = ast_strdupa(chan->name);
+ args->orig_chan_name = ast_strdupa(peer->name);
}
park_status = ast_park_call_full(chan, peer, args);