diff options
Diffstat (limited to 'res/res_musiconhold.c')
-rw-r--r-- | res/res_musiconhold.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c index efdd90bc4..f4e3a8167 100644 --- a/res/res_musiconhold.c +++ b/res/res_musiconhold.c @@ -660,8 +660,10 @@ static struct mohdata *mohalloc(struct mohclass *cl) flags = fcntl(moh->pipe[1], F_GETFL); fcntl(moh->pipe[1], F_SETFL, flags | O_NONBLOCK); moh->parent = cl; + ast_mutex_lock(&moh_lock); moh->next = cl->members; cl->members = moh; + ast_mutex_unlock(&moh_lock); return moh; } |