class is not done at the same time as any of the other operations on this list
to prevent list corruption. Using the global moh_data lock for this is not
ideal, but it is what is used to protect these lists everywhere else in the
module, and I am only changing what is necessary to fix the bug.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@75059
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
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;
}