diff options
author | Joshua Colp <jcolp@digium.com> | 2016-08-26 14:02:45 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2016-08-26 14:02:45 -0500 |
commit | 44b8cc8b48af76199c9580a1770c8971cab719c8 (patch) | |
tree | 33bd43c19d9920967247fad23af3d33c1d6fd826 | |
parent | 795532b2d5b4769cba2524e3ab235ec21854bd3e (diff) | |
parent | b86771d1bf5c1db3561048d5bd5e679a6fb340fc (diff) |
Merge "ast_framehook_detach() must be called with the channel locked."
-rw-r--r-- | res/res_fax.c | 4 | ||||
-rw-r--r-- | res/res_pjsip_refer.c | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/res/res_fax.c b/res/res_fax.c index c301aff31..b6fefe2be 100644 --- a/res/res_fax.c +++ b/res/res_fax.c @@ -4509,7 +4509,9 @@ static int acf_faxopt_write(struct ast_channel *chan, const char *cmd, char *dat ast_log(LOG_WARNING, "Attempt to attach a T.38 gateway on channel (%s) with gateway already running.\n", ast_channel_name(chan)); } } else if (ast_false(val)) { + ast_channel_lock(chan); ast_framehook_detach(chan, details->gateway_id); + ast_channel_unlock(chan); details->gateway_id = -1; } else { ast_log(LOG_WARNING, "Unsupported value '%s' passed to FAXOPT(%s).\n", value, data); @@ -4561,7 +4563,9 @@ static int acf_faxopt_write(struct ast_channel *chan, const char *cmd, char *dat ast_log(LOG_WARNING, "Attempt to attach a FAX detect on channel (%s) with FAX detect already running.\n", ast_channel_name(chan)); } } else if (ast_false(val)) { + ast_channel_lock(chan); ast_framehook_detach(chan, details->faxdetect_id); + ast_channel_unlock(chan); details->faxdetect_id = -1; } else { ast_log(LOG_WARNING, "Unsupported value '%s' passed to FAXOPT(%s).\n", value, data); diff --git a/res/res_pjsip_refer.c b/res/res_pjsip_refer.c index 78d6e23b5..19367bf32 100644 --- a/res/res_pjsip_refer.c +++ b/res/res_pjsip_refer.c @@ -641,7 +641,9 @@ static void refer_blind_callback(struct ast_channel *chan, struct transfer_chann refer_progress_notify(notification); } + ast_channel_lock(chan); ast_framehook_detach(chan, refer->progress->framehook); + ast_channel_unlock(chan); ao2_cleanup(refer->progress); } |