mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
ast_framehook_attach() must be called with the channel locked.
The framehook container could become corrupted if the channel lock is not held before calling. Change-Id: I1a6b957a1f7b899eb29a186915f8cccab886a438
This commit is contained in:
@@ -607,7 +607,10 @@ static void refer_blind_callback(struct ast_channel *chan, struct transfer_chann
|
||||
ao2_ref(refer->progress, +1);
|
||||
|
||||
/* If we can't attach a frame hook for whatever reason send a notification of success immediately */
|
||||
if ((refer->progress->framehook = ast_framehook_attach(chan, &hook)) < 0) {
|
||||
ast_channel_lock(chan);
|
||||
refer->progress->framehook = ast_framehook_attach(chan, &hook);
|
||||
ast_channel_unlock(chan);
|
||||
if (refer->progress->framehook < 0) {
|
||||
struct refer_progress_notification *notification = refer_progress_notification_alloc(refer->progress, 200,
|
||||
PJSIP_EVSUB_STATE_TERMINATED);
|
||||
|
||||
|
Reference in New Issue
Block a user