]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merge "res_parking: Fix blind transfer dynamic lots creation."
authorJoshua Colp <jcolp@digium.com>
Sat, 26 Mar 2016 19:25:46 +0000 (14:25 -0500)
committerGerrit Code Review <gerrit2@gerrit.digium.api>
Sat, 26 Mar 2016 19:25:47 +0000 (14:25 -0500)
1  2 
res/parking/parking_applications.c
res/parking/parking_bridge_features.c

Simple merge
index 4d1416eb84ae73807995a84b8e63fb02401036fd,5fe576424586868f2ed6d73752fdd7bc3ad21fa7..e053ed74edd6b481036274c817a553b00cc0ab8d
@@@ -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);