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

Simple merge
index becb74ef9a882f70b18309a005c518c2aed7a8f3,e74aed1868b036c8211552d3de9208e743b7a2d3..588b5554fe1a00c40d5f953c586012b3739d6618
@@@ -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);