fix close file snafu
This commit is contained in:
parent
ca49966f76
commit
f5c541a5c9
|
@ -410,6 +410,45 @@ switch_status_t conference_file_local_play(conference_obj_t *conference, switch_
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch_status_t conference_close_open_files(conference_obj_t *conference)
|
||||||
|
{
|
||||||
|
int x = 0;
|
||||||
|
|
||||||
|
switch_mutex_lock(conference->mutex);
|
||||||
|
/* Close Unused Handles */
|
||||||
|
if (conference->fnode) {
|
||||||
|
conference_file_node_t *fnode, *cur;
|
||||||
|
switch_memory_pool_t *pool;
|
||||||
|
|
||||||
|
fnode = conference->fnode;
|
||||||
|
while (fnode) {
|
||||||
|
cur = fnode;
|
||||||
|
fnode = fnode->next;
|
||||||
|
|
||||||
|
if (cur->type != NODE_TYPE_SPEECH) {
|
||||||
|
conference_file_close(conference, cur);
|
||||||
|
}
|
||||||
|
|
||||||
|
pool = cur->pool;
|
||||||
|
switch_core_destroy_memory_pool(&pool);
|
||||||
|
x++;
|
||||||
|
}
|
||||||
|
conference->fnode = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (conference->async_fnode) {
|
||||||
|
switch_memory_pool_t *pool;
|
||||||
|
conference_file_close(conference, conference->async_fnode);
|
||||||
|
pool = conference->async_fnode->pool;
|
||||||
|
conference->async_fnode = NULL;
|
||||||
|
switch_core_destroy_memory_pool(&pool);
|
||||||
|
x++;
|
||||||
|
}
|
||||||
|
switch_mutex_unlock(conference->mutex);
|
||||||
|
|
||||||
|
return x ? SWITCH_STATUS_SUCCESS : SWITCH_STATUS_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
/* For Emacs:
|
/* For Emacs:
|
||||||
* Local Variables:
|
* Local Variables:
|
||||||
* mode:c
|
* mode:c
|
||||||
|
|
|
@ -2681,6 +2681,8 @@ void *SWITCH_THREAD_FUNC conference_video_muxing_thread_run(switch_thread_t *thr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
conference_close_open_files(conference);
|
||||||
|
|
||||||
switch_core_timer_destroy(&canvas->timer);
|
switch_core_timer_destroy(&canvas->timer);
|
||||||
conference_video_destroy_canvas(&canvas);
|
conference_video_destroy_canvas(&canvas);
|
||||||
|
|
||||||
|
|
|
@ -860,7 +860,7 @@ void conference_member_add_file_data(conference_member_t *member, int16_t *data,
|
||||||
void conference_send_notify(conference_obj_t *conference, const char *status, const char *call_id, switch_bool_t final);
|
void conference_send_notify(conference_obj_t *conference, const char *status, const char *call_id, switch_bool_t final);
|
||||||
switch_status_t conference_file_close(conference_obj_t *conference, conference_file_node_t *node);
|
switch_status_t conference_file_close(conference_obj_t *conference, conference_file_node_t *node);
|
||||||
void *SWITCH_THREAD_FUNC conference_record_thread_run(switch_thread_t *thread, void *obj);
|
void *SWITCH_THREAD_FUNC conference_record_thread_run(switch_thread_t *thread, void *obj);
|
||||||
|
switch_status_t conference_close_open_files(conference_obj_t *conference);
|
||||||
void conference_al_gen_arc(conference_obj_t *conference, switch_stream_handle_t *stream);
|
void conference_al_gen_arc(conference_obj_t *conference, switch_stream_handle_t *stream);
|
||||||
void conference_al_process(al_handle_t *al, void *data, switch_size_t datalen, int rate);
|
void conference_al_process(al_handle_t *al, void *data, switch_size_t datalen, int rate);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue