]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
audiohook: Unlock channel in mute if no audiohooks present.
authorJoshua C. Colp <jcolp@sangoma.com>
Wed, 9 Aug 2023 08:39:17 +0000 (05:39 -0300)
committerasterisk-org-access-app[bot] <120671045+asterisk-org-access-app[bot]@users.noreply.github.com>
Wed, 9 Aug 2023 14:50:07 +0000 (14:50 +0000)
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

main/audiohook.c

index 102c0d0c61ff4061e5d9c72f734e9e5374a82a0d..57d589d118fa390011e313bbe03e5636a5129238 100644 (file)
@@ -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;
        }