diff options
author | Kinsey Moore <kmoore@digium.com> | 2011-07-12 14:40:16 +0000 |
---|---|---|
committer | Kinsey Moore <kmoore@digium.com> | 2011-07-12 14:40:16 +0000 |
commit | 934cabb22fa9f4e3b6064307188cf0df97a98412 (patch) | |
tree | 7debe828321ad147881391f544a337cfac2574df /apps/app_confbridge.c | |
parent | 0852fddf3310dd6791f1215c03b91667b81da6f0 (diff) |
Segfault on shutdown when confbridge is active
When undergoing a shutdown and channels are kicked out of a bridge, a segfault
occurs because ConfBridge tries to play sounds on the bridge after the
underlying channels have been blown away due to the shutdown.
(closes ASTERISK-18040)
Review: https://reviewboard.asterisk.org/r/1283/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@327748 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_confbridge.c')
-rw-r--r-- | apps/app_confbridge.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c index 80c84ed47..0ca2c6e8d 100644 --- a/apps/app_confbridge.c +++ b/apps/app_confbridge.c @@ -1473,6 +1473,13 @@ static int confbridge_exec(struct ast_channel *chan, const char *data) &conference_bridge_user.tech_args); send_leave_event(conference_bridge_user.chan, conference_bridge->name); + /* if we're shutting down, don't attempt to do further processing */ + if (ast_shutting_down()) { + leave_conference_bridge(conference_bridge, &conference_bridge_user); + conference_bridge = NULL; + goto confbridge_cleanup; + } + /* If this user was a video source, we need to clean up and possibly pick a new source. */ handle_video_on_exit(conference_bridge, conference_bridge_user.chan); |