confbridge: Fix some resource leaks on conference teardown.

* Made destroy_conference_bridge() destroy a missed ast_mutex_t and ast_cond_t.

* Made join_conference_bridge() init the ast_mutex_t's and ast_cond_t so
destroy_conference_bridge() can destroy them unconditionally.

* Made join_conference_bridge() abort if the new conference could not be
added to the conferences container.

* Made leave_conference() discard any post-join actions if
join_conference_bridge() had to abort early.

* Made the join_conference_bridge() diagnostic messages better describe
what happened.

* Renamed leave_conference_bridge() to leave_conference() and made it only
take a conference user pointer.  The conference pointer was redundant.

* Made conf_bridge_profile_copy() use struct copy instead of memcpy().

* No need to lock the conference in start_conf_record_thread() since all
of the callers already have it locked.
........

Merged revisions 377354 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Richard Mudgett
2012-12-06 23:58:21 +00:00
parent baff2aa4b0
commit 97fcde6af7
2 changed files with 45 additions and 33 deletions

View File

@@ -1394,7 +1394,7 @@ const struct user_profile *conf_find_user_profile(struct ast_channel *chan, cons
void conf_bridge_profile_copy(struct bridge_profile *dst, struct bridge_profile *src)
{
memcpy(dst, src, sizeof(*dst));
*dst = *src;
if (src->sounds) {
ao2_ref(src->sounds, +1);
}