提交 af23ce48 authored 作者: Michael Jerris's avatar Michael Jerris

whitespace cleanup.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3158 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 1cd87097
...@@ -197,7 +197,6 @@ struct conference_record { ...@@ -197,7 +197,6 @@ struct conference_record {
}; };
typedef struct conference_record conference_record_t; typedef struct conference_record conference_record_t;
/* Function Prototypes */ /* Function Prototypes */
static uint32_t next_member_id(void); static uint32_t next_member_id(void);
static conference_relationship_t *member_get_relationship(conference_member_t *member, conference_member_t *other_member); static conference_relationship_t *member_get_relationship(conference_member_t *member, conference_member_t *other_member);
...@@ -251,7 +250,6 @@ static uint32_t next_member_id(void) ...@@ -251,7 +250,6 @@ static uint32_t next_member_id(void)
return id; return id;
} }
static void switch_change_sln_volume(int16_t *data, uint32_t samples, int32_t vol) static void switch_change_sln_volume(int16_t *data, uint32_t samples, int32_t vol)
{ {
int16_t *p = data; int16_t *p = data;
...@@ -665,7 +663,6 @@ static void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, v ...@@ -665,7 +663,6 @@ static void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, v
muxed = (int16_t *) omember->mux_frame; muxed = (int16_t *) omember->mux_frame;
for (x = 0; x < imember->read / 2; x++) { for (x = 0; x < imember->read / 2; x++) {
int32_t z = muxed[x] + bptr[x]; int32_t z = muxed[x] + bptr[x];
switch_normalize_to_16bit(z); switch_normalize_to_16bit(z);
...@@ -685,7 +682,6 @@ static void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, v ...@@ -685,7 +682,6 @@ static void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, v
} }
} }
if (conference->fnode && conference->fnode->done) { if (conference->fnode && conference->fnode->done) {
confernce_file_node_t *fnode; confernce_file_node_t *fnode;
switch_memory_pool_t *pool; switch_memory_pool_t *pool;
...@@ -832,7 +828,6 @@ static void conference_loop(conference_member_t *member) ...@@ -832,7 +828,6 @@ static void conference_loop(conference_member_t *member)
switch_event_destroy(&event); switch_event_destroy(&event);
} }
#if 1
if (switch_channel_test_flag(channel, CF_OUTBOUND)) { if (switch_channel_test_flag(channel, CF_OUTBOUND)) {
// test to see if outbound channel has answered // test to see if outbound channel has answered
if (switch_channel_test_flag(channel, CF_ANSWERED) && !switch_test_flag(member->conference, CFLAG_ANSWERED)) { if (switch_channel_test_flag(channel, CF_ANSWERED) && !switch_test_flag(member->conference, CFLAG_ANSWERED)) {
...@@ -845,7 +840,7 @@ static void conference_loop(conference_member_t *member) ...@@ -845,7 +840,7 @@ static void conference_loop(conference_member_t *member)
switch_channel_answer(channel); switch_channel_answer(channel);
} }
} }
#endif
if (switch_channel_has_dtmf(channel)) { if (switch_channel_has_dtmf(channel)) {
switch_channel_dequeue_dtmf(channel, dtmf, sizeof(dtmf)); switch_channel_dequeue_dtmf(channel, dtmf, sizeof(dtmf));
...@@ -1068,7 +1063,6 @@ static void conference_loop(conference_member_t *member) ...@@ -1068,7 +1063,6 @@ static void conference_loop(conference_member_t *member)
switch_clear_flag_locked(member, MFLAG_RUNNING); switch_clear_flag_locked(member, MFLAG_RUNNING);
switch_core_timer_destroy(&timer); switch_core_timer_destroy(&timer);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Channel leaving conference, cause: %s\n", switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Channel leaving conference, cause: %s\n",
switch_channel_cause2str(switch_channel_get_cause(channel))); switch_channel_cause2str(switch_channel_get_cause(channel)));
...@@ -1083,7 +1077,6 @@ static void conference_loop(conference_member_t *member) ...@@ -1083,7 +1077,6 @@ static void conference_loop(conference_member_t *member)
} }
} }
/* Sub-Routine called by a record entity inside a conference */ /* Sub-Routine called by a record entity inside a conference */
static void *SWITCH_THREAD_FUNC conference_record_thread_run(switch_thread_t *thread, void *obj) static void *SWITCH_THREAD_FUNC conference_record_thread_run(switch_thread_t *thread, void *obj)
{ {
...@@ -1139,7 +1132,6 @@ static void *SWITCH_THREAD_FUNC conference_record_thread_run(switch_thread_t *th ...@@ -1139,7 +1132,6 @@ static void *SWITCH_THREAD_FUNC conference_record_thread_run(switch_thread_t *th
goto end; goto end;
} }
if (switch_core_file_open(&fh, if (switch_core_file_open(&fh,
rec->path, rec->path,
SWITCH_FILE_FLAG_WRITE | SWITCH_FILE_DATA_SHORT, SWITCH_FILE_FLAG_WRITE | SWITCH_FILE_DATA_SHORT,
...@@ -1177,8 +1169,7 @@ static void *SWITCH_THREAD_FUNC conference_record_thread_run(switch_thread_t *th ...@@ -1177,8 +1169,7 @@ static void *SWITCH_THREAD_FUNC conference_record_thread_run(switch_thread_t *th
switch_core_file_close(&fh); switch_core_file_close(&fh);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Recording Stopped\n"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Recording Stopped\n");
end: end:
if (rec->pool) { if (rec->pool) {
switch_memory_pool_t *pool = rec->pool; switch_memory_pool_t *pool = rec->pool;
...@@ -1193,7 +1184,6 @@ static void *SWITCH_THREAD_FUNC conference_record_thread_run(switch_thread_t *th ...@@ -1193,7 +1184,6 @@ static void *SWITCH_THREAD_FUNC conference_record_thread_run(switch_thread_t *th
return NULL; return NULL;
} }
/* Make files stop playing in a conference either the current one or all of them */ /* Make files stop playing in a conference either the current one or all of them */
static uint32_t conference_stop_file(conference_obj_t *conference, file_stop_t stop) static uint32_t conference_stop_file(conference_obj_t *conference, file_stop_t stop)
{ {
...@@ -1309,7 +1299,6 @@ static switch_status_t conference_play_file(conference_obj_t *conference, char * ...@@ -1309,7 +1299,6 @@ static switch_status_t conference_play_file(conference_obj_t *conference, char *
return SWITCH_STATUS_SUCCESS; return SWITCH_STATUS_SUCCESS;
} }
/* Play a file in the conference rooom to a member */ /* Play a file in the conference rooom to a member */
static switch_status_t conference_member_play_file(conference_member_t *member, char *file, uint32_t leadin) static switch_status_t conference_member_play_file(conference_member_t *member, char *file, uint32_t leadin)
{ {
...@@ -1468,7 +1457,6 @@ static switch_status_t conference_say(conference_obj_t *conference, char *text, ...@@ -1468,7 +1457,6 @@ static switch_status_t conference_say(conference_obj_t *conference, char *text,
return SWITCH_STATUS_FALSE; return SWITCH_STATUS_FALSE;
} }
fnode->pool = pool; fnode->pool = pool;
/* Queue the node */ /* Queue the node */
...@@ -1548,7 +1536,6 @@ static void conference_list(conference_obj_t *conference, switch_stream_handle_t ...@@ -1548,7 +1536,6 @@ static void conference_list(conference_obj_t *conference, switch_stream_handle_t
switch_mutex_unlock(conference->member_mutex); switch_mutex_unlock(conference->member_mutex);
} }
static void conference_list_pretty(conference_obj_t *conference, switch_stream_handle_t *stream) static void conference_list_pretty(conference_obj_t *conference, switch_stream_handle_t *stream)
{ {
conference_member_t *member = NULL; conference_member_t *member = NULL;
...@@ -2416,7 +2403,7 @@ static switch_status_t conf_function(char *buf, switch_core_session_t *session, ...@@ -2416,7 +2403,7 @@ static switch_status_t conf_function(char *buf, switch_core_session_t *session,
stream->write_function(stream, "Memory Error!\n"); stream->write_function(stream, "Memory Error!\n");
} }
done: done:
if (lbuf) { if (lbuf) {
free(lbuf); free(lbuf);
...@@ -2515,7 +2502,7 @@ static switch_status_t conference_outcall(conference_obj_t *conference, ...@@ -2515,7 +2502,7 @@ static switch_status_t conference_outcall(conference_obj_t *conference,
goto done; goto done;
} }
done: done:
return status; return status;
} }
...@@ -2725,7 +2712,6 @@ static void conference_function(switch_core_session_t *session, char *data) ...@@ -2725,7 +2712,6 @@ static void conference_function(switch_core_session_t *session, char *data)
} }
goto done; goto done;
} }
} }
/* Release the config registry handle */ /* Release the config registry handle */
...@@ -2734,7 +2720,6 @@ static void conference_function(switch_core_session_t *session, char *data) ...@@ -2734,7 +2720,6 @@ static void conference_function(switch_core_session_t *session, char *data)
cxml = NULL; cxml = NULL;
} }
if (!switch_strlen_zero(bridgeto) && strcasecmp(bridgeto, "none")) { if (!switch_strlen_zero(bridgeto) && strcasecmp(bridgeto, "none")) {
if (conference_outcall(conference, session, bridgeto, 60, NULL, NULL, NULL) != SWITCH_STATUS_SUCCESS) { if (conference_outcall(conference, session, bridgeto, 60, NULL, NULL, NULL) != SWITCH_STATUS_SUCCESS) {
goto done; goto done;
...@@ -2746,8 +2731,6 @@ static void conference_function(switch_core_session_t *session, char *data) ...@@ -2746,8 +2731,6 @@ static void conference_function(switch_core_session_t *session, char *data)
switch_set_flag(conference, CFLAG_ANSWERED); switch_set_flag(conference, CFLAG_ANSWERED);
} }
/* Save the original read codec. */ /* Save the original read codec. */
read_codec = switch_core_session_get_read_codec(session); read_codec = switch_core_session_get_read_codec(session);
member.native_rate = read_codec->implementation->samples_per_second; member.native_rate = read_codec->implementation->samples_per_second;
...@@ -2823,8 +2806,6 @@ static void conference_function(switch_core_session_t *session, char *data) ...@@ -2823,8 +2806,6 @@ static void conference_function(switch_core_session_t *session, char *data)
goto codec_done1; goto codec_done1;
} }
/* Prepare MUTEXS */ /* Prepare MUTEXS */
member.id = next_member_id(); member.id = next_member_id();
member.pool = pool; member.pool = pool;
...@@ -2862,11 +2843,11 @@ static void conference_function(switch_core_session_t *session, char *data) ...@@ -2862,11 +2843,11 @@ static void conference_function(switch_core_session_t *session, char *data)
switch_core_session_set_read_codec(member.session, read_codec); switch_core_session_set_read_codec(member.session, read_codec);
/* Clean Up. codec_done(X): is for error situations after the codecs were setup and done: is for situations before */ /* Clean Up. codec_done(X): is for error situations after the codecs were setup and done: is for situations before */
codec_done1: codec_done1:
switch_core_codec_destroy(&member.read_codec); switch_core_codec_destroy(&member.read_codec);
codec_done2: codec_done2:
switch_core_codec_destroy(&member.write_codec); switch_core_codec_destroy(&member.write_codec);
done: done:
switch_buffer_destroy(&member.resample_buffer); switch_buffer_destroy(&member.resample_buffer);
switch_buffer_destroy(&member.audio_buffer); switch_buffer_destroy(&member.audio_buffer);
...@@ -3008,7 +2989,6 @@ static void *SWITCH_THREAD_FUNC input_thread_run(switch_thread_t *thread, void * ...@@ -3008,7 +2989,6 @@ static void *SWITCH_THREAD_FUNC input_thread_run(switch_thread_t *thread, void *
switch_event_fire(&event); switch_event_fire(&event);
} }
} }
} }
} else { } else {
if (hangunder_hits) { if (hangunder_hits) {
...@@ -3154,7 +3134,6 @@ static switch_status_t chat_send(char *proto, char *from, char *to, char *subjec ...@@ -3154,7 +3134,6 @@ static switch_status_t chat_send(char *proto, char *from, char *to, char *subjec
return SWITCH_STATUS_SUCCESS; return SWITCH_STATUS_SUCCESS;
} }
static const switch_chat_interface_t conference_chat_interface = { static const switch_chat_interface_t conference_chat_interface = {
/*.name */ CONF_CHAT_PROTO, /*.name */ CONF_CHAT_PROTO,
/*.chat_send */ chat_send, /*.chat_send */ chat_send,
...@@ -3400,7 +3379,6 @@ static conference_obj_t *conference_new(char *name, switch_xml_t profile, switch ...@@ -3400,7 +3379,6 @@ static conference_obj_t *conference_new(char *name, switch_xml_t profile, switch
return conference; return conference;
} }
/* Called by FreeSWITCH when the module loads */ /* Called by FreeSWITCH when the module loads */
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename) SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
{ {
...@@ -3422,7 +3400,6 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_mod ...@@ -3422,7 +3400,6 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_mod
return SWITCH_STATUS_TERM; return SWITCH_STATUS_TERM;
} }
/* Setup a hash to store conferences by name */ /* Setup a hash to store conferences by name */
switch_core_hash_init(&globals.conference_hash, globals.conference_pool); switch_core_hash_init(&globals.conference_hash, globals.conference_pool);
switch_mutex_init(&globals.conference_mutex, SWITCH_MUTEX_NESTED, globals.conference_pool); switch_mutex_init(&globals.conference_mutex, SWITCH_MUTEX_NESTED, globals.conference_pool);
...@@ -3434,7 +3411,6 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_mod ...@@ -3434,7 +3411,6 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_mod
return status; return status;
} }
SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void) SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void)
{ {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论