summaryrefslogtreecommitdiff
path: root/res/res_parking.c
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2016-03-23 14:24:49 -0500
committerRichard Mudgett <rmudgett@digium.com>2016-03-25 18:32:42 -0500
commit3cf714031c51af0f2c21166bb9d161b144f5723c (patch)
treed3da8948b7218ac5b753c25c67a36646b2320062 /res/res_parking.c
parent1555cf8951f9d15c980b390728b00cec0f5c8b53 (diff)
res_parking: Cleanup find_channel_parking_lot_name() usage.
Change-Id: I8f7a8890aef27824301c642d4d15407ac83e6f02
Diffstat (limited to 'res/res_parking.c')
-rw-r--r--res/res_parking.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/res/res_parking.c b/res/res_parking.c
index 02740da61..68a0e7d5c 100644
--- a/res/res_parking.c
+++ b/res/res_parking.c
@@ -568,14 +568,13 @@ const char *find_channel_parking_lot_name(struct ast_channel *chan)
/* The channel variable overrides everything */
name = pbx_builtin_getvar_helper(chan, "PARKINGLOT");
- if (ast_strlen_zero(name) && !ast_strlen_zero(ast_channel_parkinglot(chan))) {
- /* Use the channel's parking lot. */
- name = ast_channel_parkinglot(chan);
- }
-
- /* If the name couldn't be pulled from that either, use the default parking lot name. */
if (ast_strlen_zero(name)) {
- name = DEFAULT_PARKING_LOT;
+ /* Try the channel's parking lot. */
+ name = ast_channel_parkinglot(chan);
+ if (ast_strlen_zero(name)) {
+ /* Fall back to the default parking lot. */
+ name = DEFAULT_PARKING_LOT;
+ }
}
return name;