From: Joshua C. Colp Date: Wed, 9 Aug 2023 08:39:17 +0000 (-0300) Subject: audiohook: Unlock channel in mute if no audiohooks present. X-Git-Tag: 21.0.0-pre1~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=806515597e92ba875b2c4a9fe815dc329623fb44;p=thirdparty%2Fasterisk.git audiohook: Unlock channel in mute if no audiohooks present. In the case where mute was called on a channel that had no audiohooks the code was not unlocking the channel, resulting in a deadlock. Resolves: #233 --- diff --git a/main/audiohook.c b/main/audiohook.c index 102c0d0c61..57d589d118 100644 --- a/main/audiohook.c +++ b/main/audiohook.c @@ -1385,6 +1385,7 @@ int ast_audiohook_set_mute_all(struct ast_channel *chan, const char *source, enu ast_channel_lock(chan); if (!ast_channel_audiohooks(chan)) { + ast_channel_unlock(chan); return -1; }