]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_parking: Fix bug where reloading immediately wipes new parkpos extensions
authorJonathan Rose <jrose@digium.com>
Thu, 17 Oct 2013 18:16:33 +0000 (18:16 +0000)
committerJonathan Rose <jrose@digium.com>
Thu, 17 Oct 2013 18:16:33 +0000 (18:16 +0000)
(closes issue ASTERISK-22631)
Reported by: Kevin Harwell

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@401158 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_parking.c

index 211bbf8a8023676bc8afce0a1e2cbc93a6ea3b87..881bb12880fcc26c8ffb179177c3634bfe7fbae5 100644 (file)
@@ -623,6 +623,9 @@ void parking_lot_cfg_remove_extensions(struct parking_lot_cfg *lot_cfg)
                 */
                ast_context_destroy(NULL, lot_cfg->registrar);
        }
+
+       /* If we come back for a second pass, someone else has this registrar now. */
+       ast_string_field_set(lot_cfg, registrar, "");
 }
 
 static void remove_all_configured_parking_lot_extensions(void)