lets send the event about the conference before we free the pool mmmkay
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3566 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
8b87814097
commit
6fb36fcb2c
|
@ -734,6 +734,20 @@ static void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, v
|
||||||
switch_mutex_unlock(conference->mutex);
|
switch_mutex_unlock(conference->mutex);
|
||||||
} /* Rinse ... Repeat */
|
} /* Rinse ... Repeat */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (switch_event_create(&event, SWITCH_EVENT_PRESENCE_IN) == SWITCH_STATUS_SUCCESS) {
|
||||||
|
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", CONF_CHAT_PROTO);
|
||||||
|
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", conference->name);
|
||||||
|
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s@%s", conference->name, conference->domain);
|
||||||
|
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "status", "Inactive");
|
||||||
|
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "rpid", "idle");
|
||||||
|
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "event_type", "presence");
|
||||||
|
|
||||||
|
switch_event_fire(&event);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
switch_core_timer_destroy(&timer);
|
switch_core_timer_destroy(&timer);
|
||||||
|
|
||||||
if (switch_test_flag(conference, CFLAG_DESTRUCT)) {
|
if (switch_test_flag(conference, CFLAG_DESTRUCT)) {
|
||||||
|
@ -778,16 +792,6 @@ static void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, v
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (switch_event_create(&event, SWITCH_EVENT_PRESENCE_IN) == SWITCH_STATUS_SUCCESS) {
|
|
||||||
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", CONF_CHAT_PROTO);
|
|
||||||
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", conference->name);
|
|
||||||
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s@%s", conference->name, conference->domain);
|
|
||||||
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "status", "Inactive");
|
|
||||||
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "rpid", "idle");
|
|
||||||
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "event_type", "presence");
|
|
||||||
|
|
||||||
switch_event_fire(&event);
|
|
||||||
}
|
|
||||||
switch_mutex_lock(globals.hash_mutex);
|
switch_mutex_lock(globals.hash_mutex);
|
||||||
globals.threads--;
|
globals.threads--;
|
||||||
switch_mutex_unlock(globals.hash_mutex);
|
switch_mutex_unlock(globals.hash_mutex);
|
||||||
|
|
Loading…
Reference in New Issue