mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 03:20:57 +00:00
res_parking: Cleanup find_channel_parking_lot_name() usage.
Change-Id: I8f7a8890aef27824301c642d4d15407ac83e6f02
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user