doh! (it's in the dictionary now btw)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16265 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
bd422c31af
commit
563b20b814
|
@ -3452,6 +3452,7 @@ static switch_status_t conf_api_sub_list(conference_obj_t *conference, switch_st
|
||||||
}
|
}
|
||||||
|
|
||||||
if (conference == NULL) {
|
if (conference == NULL) {
|
||||||
|
switch_mutex_lock(globals.hash_mutex);
|
||||||
for (hi = switch_hash_first(NULL, globals.conference_hash); hi; hi = switch_hash_next(hi)) {
|
for (hi = switch_hash_first(NULL, globals.conference_hash); hi; hi = switch_hash_next(hi)) {
|
||||||
switch_hash_this(hi, NULL, NULL, &val);
|
switch_hash_this(hi, NULL, NULL, &val);
|
||||||
conference = (conference_obj_t *) val;
|
conference = (conference_obj_t *) val;
|
||||||
|
@ -3471,6 +3472,7 @@ static switch_status_t conf_api_sub_list(conference_obj_t *conference, switch_st
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
switch_mutex_unlock(globals.hash_mutex);
|
||||||
} else {
|
} else {
|
||||||
count++;
|
count++;
|
||||||
if (pretty) {
|
if (pretty) {
|
||||||
|
@ -3630,6 +3632,7 @@ static switch_status_t conf_api_sub_xml_list(conference_obj_t *conference, switc
|
||||||
switch_assert(x_conferences);
|
switch_assert(x_conferences);
|
||||||
|
|
||||||
if (conference == NULL) {
|
if (conference == NULL) {
|
||||||
|
switch_mutex_lock(globals.hash_mutex);
|
||||||
for (hi = switch_hash_first(NULL, globals.conference_hash); hi; hi = switch_hash_next(hi)) {
|
for (hi = switch_hash_first(NULL, globals.conference_hash); hi; hi = switch_hash_next(hi)) {
|
||||||
switch_hash_this(hi, NULL, NULL, &val);
|
switch_hash_this(hi, NULL, NULL, &val);
|
||||||
conference = (conference_obj_t *) val;
|
conference = (conference_obj_t *) val;
|
||||||
|
@ -3641,6 +3644,7 @@ static switch_status_t conf_api_sub_xml_list(conference_obj_t *conference, switc
|
||||||
conference_xlist(conference, x_conference, off);
|
conference_xlist(conference, x_conference, off);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
switch_mutex_unlock(globals.hash_mutex);
|
||||||
} else {
|
} else {
|
||||||
x_conference = switch_xml_add_child_d(x_conferences, "conference", off++);
|
x_conference = switch_xml_add_child_d(x_conferences, "conference", off++);
|
||||||
switch_assert(conference);
|
switch_assert(conference);
|
||||||
|
@ -6088,7 +6092,9 @@ static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_m
|
||||||
switch_mutex_init(&conference->flag_mutex, SWITCH_MUTEX_NESTED, conference->pool);
|
switch_mutex_init(&conference->flag_mutex, SWITCH_MUTEX_NESTED, conference->pool);
|
||||||
switch_thread_rwlock_create(&conference->rwlock, conference->pool);
|
switch_thread_rwlock_create(&conference->rwlock, conference->pool);
|
||||||
switch_mutex_init(&conference->member_mutex, SWITCH_MUTEX_NESTED, conference->pool);
|
switch_mutex_init(&conference->member_mutex, SWITCH_MUTEX_NESTED, conference->pool);
|
||||||
|
switch_mutex_lock(globals.hash_mutex);
|
||||||
switch_core_hash_insert(globals.conference_hash, conference->name, conference);
|
switch_core_hash_insert(globals.conference_hash, conference->name, conference);
|
||||||
|
switch_mutex_unlock(globals.hash_mutex);
|
||||||
|
|
||||||
end:
|
end:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue