summaryrefslogtreecommitdiff
path: root/res/parking/parking_bridge_features.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:30:41 -0500
commit05fc3a96d108d48214b47ea2212432498bea3a33 (patch)
tree3536c56e7737006b546da767471d7db67bfb3281 /res/parking/parking_bridge_features.c
parent01150597f60cb0e4b906b2bf2b94188bb3b6ca14 (diff)
res_parking: Cleanup find_channel_parking_lot_name() usage.
Change-Id: I8f7a8890aef27824301c642d4d15407ac83e6f02
Diffstat (limited to 'res/parking/parking_bridge_features.c')
-rw-r--r--res/parking/parking_bridge_features.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/res/parking/parking_bridge_features.c b/res/parking/parking_bridge_features.c
index a21be9068..becb74ef9 100644
--- a/res/parking/parking_bridge_features.c
+++ b/res/parking/parking_bridge_features.c
@@ -474,19 +474,12 @@ static int parking_park_bridge_channel(struct ast_bridge_channel *bridge_channel
static int parking_park_call(struct ast_bridge_channel *parker, char *exten, size_t length)
{
RAII_VAR(struct parking_lot *, lot, NULL, ao2_cleanup);
- const char *lot_name = NULL;
+ const char *lot_name;
ast_channel_lock(parker->chan);
- lot_name = find_channel_parking_lot_name(parker->chan);
- if (!ast_strlen_zero(lot_name)) {
- lot_name = ast_strdupa(lot_name);
- }
+ lot_name = ast_strdupa(find_channel_parking_lot_name(parker->chan));
ast_channel_unlock(parker->chan);
- if (ast_strlen_zero(lot_name)) {
- return -1;
- }
-
lot = parking_lot_find_by_name(lot_name);
if (!lot) {
ast_log(AST_LOG_WARNING, "Cannot Park %s: lot %s unknown\n",