From: Joshua Colp Date: Sat, 26 Mar 2016 19:25:46 +0000 (-0500) Subject: Merge "res_parking: Fix blind transfer dynamic lots creation." X-Git-Tag: 14.0.0-beta1~308 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77a9272431296772f5930301175bc0832076ac3e;p=thirdparty%2Fasterisk.git Merge "res_parking: Fix blind transfer dynamic lots creation." --- 77a9272431296772f5930301175bc0832076ac3e diff --cc res/parking/parking_bridge_features.c index 4d1416eb84,5fe5764245..e053ed74ed --- a/res/parking/parking_bridge_features.c +++ b/res/parking/parking_bridge_features.c @@@ -474,13 -475,23 +475,16 @@@ static int parking_park_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) { + lot = parking_create_dynamic_lot(lot_name, parker->chan); + } if (!lot) { ast_log(AST_LOG_WARNING, "Cannot Park %s: lot %s unknown\n", ast_channel_name(parker->chan), lot_name);