]> 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)
committerJoshua C. Colp <jcolp@sangoma.com>
Wed, 9 Aug 2023 14:50:02 +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 321a94d52c363ca883aab2851466a9a090364295..59b2f47b24554d5e7677b062b2863f3659c7bf6b 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;
        }