diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-19 13:00:57 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-19 13:00:57 +0000 |
commit | 8f64e3153658e93f68c133233ff126617a076b5d (patch) | |
tree | a43a30b49c2a4b50e31dcc2bf50fde8c15a37d04 /res/res_features.c | |
parent | 52b884731efe2de306c3f688045dd7180a48fa0a (diff) |
Merged revisions 69846 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r69846 | file | 2007-06-19 08:57:55 -0400 (Tue, 19 Jun 2007) | 2 lines
Add parked call extension AFTER the parking slot has been announced, otherwise two threads will try to handle the same channel and it will go kaboom. (issue #9191 reported by japple)
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@69847 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_features.c')
-rw-r--r-- | res/res_features.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/res/res_features.c b/res/res_features.c index 81ac83950..b672df72f 100644 --- a/res/res_features.c +++ b/res/res_features.c @@ -421,13 +421,13 @@ int ast_park_call(struct ast_channel *chan, struct ast_channel *peer, int timeou con = ast_context_create(NULL, parking_con, registrar); if (!con) /* Still no context? Bad */ ast_log(LOG_ERROR, "Parking context '%s' does not exist and unable to create\n", parking_con); - else { /* Add extension to context */ - if (!ast_add_extension2(con, 1, pu->parkingexten, 1, NULL, NULL, parkedcall, strdup(pu->parkingexten), ast_free, registrar)) - notify_metermaids(pu->parkingexten, parking_con); - } /* Tell the peer channel the number of the parking space */ if (peer && pu->parkingnum != -1) /* Only say number if it's a number */ ast_say_digits(peer, pu->parkingnum, "", peer->language); + if (con) { + if (!ast_add_extension2(con, 1, pu->parkingexten, 1, NULL, NULL, parkedcall, strdup(pu->parkingexten), ast_free, registrar)) + notify_metermaids(pu->parkingexten, parking_con); + } if (pu->notquiteyet) { /* Wake up parking thread if we're really done */ ast_indicate_data(pu->chan, AST_CONTROL_HOLD, |