diff options
author | zuul <zuul@gerrit.asterisk.org> | 2016-03-26 11:33:00 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2016-03-26 11:33:01 -0500 |
commit | 3974bf1ef0f06cf221c98fdf3036dcb084896c74 (patch) | |
tree | eff3d1adfc7f09247b47309a08e107c9051c535d /res/res_parking.c | |
parent | 6f95b5eda19850a7e4dd140b2d7e7bd8d10dcf18 (diff) | |
parent | 05fc3a96d108d48214b47ea2212432498bea3a33 (diff) |
Merge "res_parking: Cleanup find_channel_parking_lot_name() usage." into 13
Diffstat (limited to 'res/res_parking.c')
-rw-r--r-- | res/res_parking.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/res/res_parking.c b/res/res_parking.c index 0a9e6d1a3..eb47d9b08 100644 --- a/res/res_parking.c +++ b/res/res_parking.c @@ -613,14 +613,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; |