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
This commit is contained in:
Joshua C. Colp 2023-08-09 05:39:17 -03:00 committed by asterisk-org-access-app[bot]
parent e1a1ae933b
commit 806515597e
1 changed files with 1 additions and 0 deletions

View 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;
}