diff --git a/src/include/switch_utils.h b/src/include/switch_utils.h index de811dd83b..a9c9c41d81 100644 --- a/src/include/switch_utils.h +++ b/src/include/switch_utils.h @@ -286,7 +286,7 @@ SWITCH_DECLARE(switch_time_t) switch_str_time(const char *in); \param vname the name of the global pointer to modify with the new function */ #define SWITCH_DECLARE_GLOBAL_STRING_FUNC(fname, vname) static void fname(char *string) { if (!string) return;\ -if (vname) {free(vname); vname = NULL;}vname = strdup(string);} + if (vname) {free(vname); vname = NULL;}vname = strdup(string);} static void fname(char *string) /*! \brief Separate a string into an array based on a character delimeter diff --git a/src/mod/dialplans/mod_dialplan_directory/mod_dialplan_directory.c b/src/mod/dialplans/mod_dialplan_directory/mod_dialplan_directory.c index f11a4d5ada..fd37d4b577 100644 --- a/src/mod/dialplans/mod_dialplan_directory/mod_dialplan_directory.c +++ b/src/mod/dialplans/mod_dialplan_directory/mod_dialplan_directory.c @@ -45,13 +45,13 @@ static struct { char *base; } globals; -SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_directory_name, globals.directory_name) - SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_host, globals.host) - SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dn, globals.dn) - SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_pass, globals.pass) - SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_base, globals.base) +SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_directory_name, globals.directory_name); +SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_host, globals.host); +SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dn, globals.dn); +SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_pass, globals.pass); +SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_base, globals.base); - static void load_config(void) +static void load_config(void) { char *cf = "dialplan_directory.conf"; switch_xml_t cfg, xml, settings, param; @@ -138,7 +138,7 @@ SWITCH_STANDARD_DIALPLAN(directory_dialplan_hunt) } } } - out: + out: switch_core_directory_close(&dh); diff --git a/src/mod/endpoints/mod_alsa/mod_alsa.c b/src/mod/endpoints/mod_alsa/mod_alsa.c index 51053a6e5f..8d578caa94 100644 --- a/src/mod/endpoints/mod_alsa/mod_alsa.c +++ b/src/mod/endpoints/mod_alsa/mod_alsa.c @@ -130,13 +130,13 @@ static struct { #define PA_SLAVE 0 -SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dialplan, globals.dialplan)//; -SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_cid_name, globals.cid_name)//; -SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_cid_num, globals.cid_num)//; -SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_ring_file, globals.ring_file)//; -SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_hold_file, globals.hold_file)//; -SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_timer_name, globals.timer_name)//; -SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_device_name, globals.device_name)//; +SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dialplan, globals.dialplan); +SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_cid_name, globals.cid_name); +SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_cid_num, globals.cid_num); +SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_ring_file, globals.ring_file); +SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_hold_file, globals.hold_file); +SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_timer_name, globals.timer_name); +SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_device_name, globals.device_name); #define is_master(t) switch_test_flag(t, TFLAG_MASTER) static void add_pvt(private_t * tech_pvt, int master); diff --git a/src/mod/endpoints/mod_dingaling/mod_dingaling.c b/src/mod/endpoints/mod_dingaling/mod_dingaling.c index 266071245e..224d5cf8d0 100644 --- a/src/mod/endpoints/mod_dingaling/mod_dingaling.c +++ b/src/mod/endpoints/mod_dingaling/mod_dingaling.c @@ -191,9 +191,9 @@ struct rfc2833_digit { }; -SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dialplan, globals.dialplan) -SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_codec_string, globals.codec_string) -SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_codec_rates_string, globals.codec_rates_string) +SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dialplan, globals.dialplan); +SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_codec_string, globals.codec_string); +SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_codec_rates_string, globals.codec_rates_string); static switch_status_t dl_login(const char *arg, switch_core_session_t *session, switch_stream_handle_t *stream); static switch_status_t dl_logout(const char *profile_name, switch_core_session_t *session, switch_stream_handle_t *stream); diff --git a/src/mod/endpoints/mod_iax/mod_iax.c b/src/mod/endpoints/mod_iax/mod_iax.c index 7c1ea5d16f..25e9a1c5d4 100644 --- a/src/mod/endpoints/mod_iax/mod_iax.c +++ b/src/mod/endpoints/mod_iax/mod_iax.c @@ -101,22 +101,22 @@ struct private_object { typedef struct private_object private_t; -SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dialplan, globals.dialplan) - SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_codec_string, globals.codec_string) - SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_codec_rates_string, globals.codec_rates_string) - SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_ip, globals.ip) +SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dialplan, globals.dialplan); +SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_codec_string, globals.codec_string); +SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_codec_rates_string, globals.codec_rates_string); +SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_ip, globals.ip); - static char *IAXNAMES[] = { "IAX_EVENT_CONNECT", "IAX_EVENT_ACCEPT", "IAX_EVENT_HANGUP", "IAX_EVENT_REJECT", "IAX_EVENT_VOICE", - "IAX_EVENT_DTMF", "IAX_EVENT_TIMEOUT", "IAX_EVENT_LAGRQ", "IAX_EVENT_LAGRP", "IAX_EVENT_RINGA", - "IAX_EVENT_PING", "IAX_EVENT_PONG", "IAX_EVENT_BUSY", "IAX_EVENT_ANSWER", "IAX_EVENT_IMAGE", - "IAX_EVENT_AUTHRQ", "IAX_EVENT_AUTHRP", "IAX_EVENT_REGREQ", "IAX_EVENT_REGACK", - "IAX_EVENT_URL", "IAX_EVENT_LDCOMPLETE", "IAX_EVENT_TRANSFER", "IAX_EVENT_DPREQ", - "IAX_EVENT_DPREP", "IAX_EVENT_DIAL", "IAX_EVENT_QUELCH", "IAX_EVENT_UNQUELCH", - "IAX_EVENT_UNLINK", "IAX_EVENT_LINKREJECT", "IAX_EVENT_TEXT", "IAX_EVENT_REGREJ", - "IAX_EVENT_LINKURL", "IAX_EVENT_CNG", "IAX_EVENT_REREQUEST", "IAX_EVENT_TXREPLY", - "IAX_EVENT_TXREJECT", "IAX_EVENT_TXACCEPT", "IAX_EVENT_TXREADY" - }; +static char *IAXNAMES[] = { "IAX_EVENT_CONNECT", "IAX_EVENT_ACCEPT", "IAX_EVENT_HANGUP", "IAX_EVENT_REJECT", "IAX_EVENT_VOICE", + "IAX_EVENT_DTMF", "IAX_EVENT_TIMEOUT", "IAX_EVENT_LAGRQ", "IAX_EVENT_LAGRP", "IAX_EVENT_RINGA", + "IAX_EVENT_PING", "IAX_EVENT_PONG", "IAX_EVENT_BUSY", "IAX_EVENT_ANSWER", "IAX_EVENT_IMAGE", + "IAX_EVENT_AUTHRQ", "IAX_EVENT_AUTHRP", "IAX_EVENT_REGREQ", "IAX_EVENT_REGACK", + "IAX_EVENT_URL", "IAX_EVENT_LDCOMPLETE", "IAX_EVENT_TRANSFER", "IAX_EVENT_DPREQ", + "IAX_EVENT_DPREP", "IAX_EVENT_DIAL", "IAX_EVENT_QUELCH", "IAX_EVENT_UNQUELCH", + "IAX_EVENT_UNLINK", "IAX_EVENT_LINKREJECT", "IAX_EVENT_TEXT", "IAX_EVENT_REGREJ", + "IAX_EVENT_LINKURL", "IAX_EVENT_CNG", "IAX_EVENT_REREQUEST", "IAX_EVENT_TXREPLY", + "IAX_EVENT_TXREJECT", "IAX_EVENT_TXACCEPT", "IAX_EVENT_TXREADY" +}; struct ast_iana { @@ -127,24 +127,24 @@ struct ast_iana { //999 means it's wrong nad i dont know the real one static struct ast_iana AST_IANA[] = { {AST_FORMAT_G723_1, 4, "g723.1"}, -{AST_FORMAT_GSM, 3, "gsm"}, -{AST_FORMAT_ULAW, 0, "ulaw"}, -{AST_FORMAT_ALAW, 8, "alaw"}, -{AST_FORMAT_G726, 999, "g726"}, -{AST_FORMAT_ADPCM, 999, "adpcm"}, -{AST_FORMAT_SLINEAR, 10, "slinear"}, -{AST_FORMAT_LPC10, 7, "lpc10"}, -{AST_FORMAT_G729A, 18, "g729"}, -{AST_FORMAT_SPEEX, 97, "speex"}, -{AST_FORMAT_SPEEX, 98, "speex"}, -{AST_FORMAT_ILBC, 102, "ilbc"}, -{AST_FORMAT_MAX_AUDIO, 999, ""}, -{AST_FORMAT_JPEG, 999, ""}, -{AST_FORMAT_PNG, 999, ""}, -{AST_FORMAT_H261, 999, ""}, -{AST_FORMAT_H263, 999, ""}, -{AST_FORMAT_MAX_VIDEO, 999, ""}, -{0, 0} + {AST_FORMAT_GSM, 3, "gsm"}, + {AST_FORMAT_ULAW, 0, "ulaw"}, + {AST_FORMAT_ALAW, 8, "alaw"}, + {AST_FORMAT_G726, 999, "g726"}, + {AST_FORMAT_ADPCM, 999, "adpcm"}, + {AST_FORMAT_SLINEAR, 10, "slinear"}, + {AST_FORMAT_LPC10, 7, "lpc10"}, + {AST_FORMAT_G729A, 18, "g729"}, + {AST_FORMAT_SPEEX, 97, "speex"}, + {AST_FORMAT_SPEEX, 98, "speex"}, + {AST_FORMAT_ILBC, 102, "ilbc"}, + {AST_FORMAT_MAX_AUDIO, 999, ""}, + {AST_FORMAT_JPEG, 999, ""}, + {AST_FORMAT_PNG, 999, ""}, + {AST_FORMAT_H261, 999, ""}, + {AST_FORMAT_H263, 999, ""}, + {AST_FORMAT_MAX_VIDEO, 999, ""}, + {0, 0} }; static char *ast2str(int ast) @@ -449,9 +449,9 @@ static void tech_init(private_t * tech_pvt, switch_core_session_t *session) } /* -State methods they get called when the state changes to the specific state -returning SWITCH_STATUS_SUCCESS tells the core to execute the standard state method next -so if you fully implement the state you can return SWITCH_STATUS_FALSE to skip it. + State methods they get called when the state changes to the specific state + returning SWITCH_STATUS_SUCCESS tells the core to execute the standard state method next + so if you fully implement the state you can return SWITCH_STATUS_FALSE to skip it. */ static switch_status_t channel_on_init(switch_core_session_t *session) { @@ -695,7 +695,7 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch return SWITCH_STATUS_FALSE; - cng: + cng: data = (switch_byte_t *) tech_pvt->read_frame.data; data[0] = 65; data[1] = 0; @@ -784,7 +784,7 @@ static switch_status_t channel_receive_message(switch_core_session_t *session, s } /* Make sure when you have 2 sessions in the same scope that you pass the appropriate one to the routines -that allocate memory or you will have 1 channel with memory allocated from another channel's pool! + that allocate memory or you will have 1 channel with memory allocated from another channel's pool! */ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile, diff --git a/src/mod/endpoints/mod_portaudio/mod_portaudio.c b/src/mod/endpoints/mod_portaudio/mod_portaudio.c index 800b0055f5..ae20c99e16 100644 --- a/src/mod/endpoints/mod_portaudio/mod_portaudio.c +++ b/src/mod/endpoints/mod_portaudio/mod_portaudio.c @@ -128,41 +128,42 @@ static struct { #define PA_SLAVE 0 -SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dialplan, globals.dialplan) - SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_cid_name, globals.cid_name) - SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_cid_num, globals.cid_num) - SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_ring_file, globals.ring_file) - SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_hold_file, globals.hold_file) - SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_timer_name, globals.timer_name) +SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dialplan, globals.dialplan); +SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_cid_name, globals.cid_name); +SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_cid_num, globals.cid_num); +SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_ring_file, globals.ring_file); +SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_hold_file, globals.hold_file); +SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_timer_name, globals.timer_name); #define is_master(t) switch_test_flag(t, TFLAG_MASTER) - static void add_pvt(private_t * tech_pvt, int master); - static void remove_pvt(private_t * tech_pvt); - static switch_status_t channel_on_init(switch_core_session_t *session); - static switch_status_t channel_on_hangup(switch_core_session_t *session); - static switch_status_t channel_on_ring(switch_core_session_t *session); - static switch_status_t channel_on_loopback(switch_core_session_t *session); - static switch_status_t channel_on_transmit(switch_core_session_t *session); - static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session, - switch_caller_profile_t *outbound_profile, - switch_core_session_t **new_session, switch_memory_pool_t **pool); - static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flags, int stream_id); - static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, switch_io_flag_t flags, int stream_id); - static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig); - static switch_status_t engage_device(int samplerate, int codec_ms); - static switch_status_t engage_ring_device(int sample_rate, int channels); - static void deactivate_ring_device(void); - static int dump_info(void); - static switch_status_t load_config(void); - static int get_dev_by_name(char *name, int in); - static int get_dev_by_number(int number, int in); - static switch_status_t pa_cmd(const char *dest, switch_core_session_t *session, switch_stream_handle_t *stream); + +static void add_pvt(private_t * tech_pvt, int master); +static void remove_pvt(private_t * tech_pvt); +static switch_status_t channel_on_init(switch_core_session_t *session); +static switch_status_t channel_on_hangup(switch_core_session_t *session); +static switch_status_t channel_on_ring(switch_core_session_t *session); +static switch_status_t channel_on_loopback(switch_core_session_t *session); +static switch_status_t channel_on_transmit(switch_core_session_t *session); +static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session, + switch_caller_profile_t *outbound_profile, + switch_core_session_t **new_session, switch_memory_pool_t **pool); +static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flags, int stream_id); +static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, switch_io_flag_t flags, int stream_id); +static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig); +static switch_status_t engage_device(int samplerate, int codec_ms); +static switch_status_t engage_ring_device(int sample_rate, int channels); +static void deactivate_ring_device(void); +static int dump_info(void); +static switch_status_t load_config(void); +static int get_dev_by_name(char *name, int in); +static int get_dev_by_number(int number, int in); +static switch_status_t pa_cmd(const char *dest, switch_core_session_t *session, switch_stream_handle_t *stream); /* State methods they get called when the state changes to the specific state returning SWITCH_STATUS_SUCCESS tells the core to execute the standard state method next so if you fully implement the state you can return SWITCH_STATUS_FALSE to skip it. */ - static switch_status_t channel_on_init(switch_core_session_t *session) +static switch_status_t channel_on_init(switch_core_session_t *session) { switch_channel_t *channel; private_t *tech_pvt = NULL; @@ -583,12 +584,12 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch goto hold; } - cng: + cng: switch_yield(globals.read_codec.implementation->microseconds_per_frame); *frame = &globals.cng_frame; return SWITCH_STATUS_SUCCESS; - hold: + hold: { switch_size_t olen = globals.read_codec.implementation->samples_per_frame; @@ -1040,7 +1041,7 @@ static void PrintSupportedStandardSampleRates(const PaStreamParameters * inputPa int i, printCount, cr = 7; PaError err; static double standardSampleRates[] = { 8000.0, 9600.0, 11025.0, 12000.0, 16000.0, 22050.0, 24000.0, 32000.0, - 44100.0, 48000.0, 88200.0, 96000.0, 192000.0, -1 + 44100.0, 48000.0, 88200.0, 96000.0, 192000.0, -1 }; printCount = cr; @@ -1184,7 +1185,7 @@ static int dump_info(void) return 0; - error: + error: switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_ERROR, "An error occured while using the portaudio stream\n"); switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_ERROR, "Error number: %d\n", err); switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_ERROR, "Error message: %s\n", Pa_GetErrorText(err)); @@ -1370,7 +1371,7 @@ static switch_status_t switch_call(char **argv, int argc, switch_stream_handle_t stream->write_function(stream, "NO SUCH CALL\n"); } - done: + done: switch_mutex_unlock(globals.pvt_lock); return SWITCH_STATUS_SUCCESS; @@ -1436,7 +1437,7 @@ static switch_status_t answer_call(char **argv, int argc, switch_stream_handle_t break; } } - done: + done: switch_mutex_unlock(globals.pvt_lock); stream->write_function(stream, "Answered %d channels.\n", x); @@ -1490,7 +1491,7 @@ static switch_status_t do_flags(char **argv, int argc, switch_stream_handle_t *s goto bad; } - desc: + desc: x = 0; stream->write_function(stream, "FLAGS: "); if (switch_test_flag((&globals), GFLAG_EAR)) { @@ -1507,9 +1508,9 @@ static switch_status_t do_flags(char **argv, int argc, switch_stream_handle_t *s goto done; - bad: + bad: stream->write_function(stream, "Usage: flags [on|off] \n"); - done: + done: return SWITCH_STATUS_SUCCESS; } @@ -1796,7 +1797,7 @@ SWITCH_STANDARD_API(pa_cmd) } } - done: + done: if (http) { diff --git a/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c b/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c index 92574a3fa4..71ce92ef22 100644 --- a/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c +++ b/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c @@ -53,10 +53,10 @@ static struct { int running; } globals; -SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_address, globals.address) - SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_bindings, globals.bindings) +SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_address, globals.address); +SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_bindings, globals.bindings); #define MULTICAST_EVENT "multicast::event" - static switch_status_t load_config(void) +static switch_status_t load_config(void) { switch_status_t status = SWITCH_STATUS_SUCCESS; char *cf = "event_multicast.conf"; diff --git a/src/mod/event_handlers/mod_event_socket/mod_event_socket.c b/src/mod/event_handlers/mod_event_socket/mod_event_socket.c index 96ed79b198..dc47e44139 100644 --- a/src/mod/event_handlers/mod_event_socket/mod_event_socket.c +++ b/src/mod/event_handlers/mod_event_socket/mod_event_socket.c @@ -91,13 +91,13 @@ static struct { int threads; } prefs; -SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_pref_ip, prefs.ip) - SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_pref_pass, prefs.password) +SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_pref_ip, prefs.ip); +SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_pref_pass, prefs.password); - static void *SWITCH_THREAD_FUNC listener_run(switch_thread_t * thread, void *obj); - static void launch_listener_thread(listener_t * listener); +static void *SWITCH_THREAD_FUNC listener_run(switch_thread_t * thread, void *obj); +static void launch_listener_thread(listener_t * listener); - static switch_status_t socket_logger(const switch_log_node_t *node, switch_log_level_t level) +static switch_status_t socket_logger(const switch_log_node_t *node, switch_log_level_t level) { listener_t *l; @@ -565,7 +565,7 @@ static void *SWITCH_THREAD_FUNC api_exec(switch_thread_t * thread, void *obj) switch_thread_rwlock_unlock(acs->listener->rwlock); } - done: + done: if (acs && acs->bg) { switch_memory_pool_t *pool = acs->pool; acs = NULL; @@ -875,7 +875,7 @@ static switch_status_t parse_command(listener_t * listener, switch_event_t *even } } - end: + end: cur = next; } } @@ -964,7 +964,7 @@ static switch_status_t parse_command(listener_t * listener, switch_event_t *even } } - done: + done: if (event) { switch_event_destroy(&event); } @@ -1102,7 +1102,7 @@ static void *SWITCH_THREAD_FUNC listener_run(switch_thread_t * thread, void *obj } - done: + done: remove_listener(listener); @@ -1225,7 +1225,7 @@ SWITCH_MODULE_RUNTIME_FUNCTION(mod_event_socket_runtime) goto sock_fail; switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Socket up listening on %s:%u\n", prefs.ip, prefs.port); break; - sock_fail: + sock_fail: switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Socket Error!\n"); switch_yield(100000); } @@ -1284,7 +1284,7 @@ SWITCH_MODULE_RUNTIME_FUNCTION(mod_event_socket_runtime) switch_core_destroy_memory_pool(&listener_pool); } - fail: + fail: return SWITCH_STATUS_TERM; } diff --git a/src/mod/loggers/mod_syslog/mod_syslog.c b/src/mod/loggers/mod_syslog/mod_syslog.c index 0f3f4c5b65..97a5dc3f91 100644 --- a/src/mod/loggers/mod_syslog/mod_syslog.c +++ b/src/mod/loggers/mod_syslog/mod_syslog.c @@ -52,23 +52,23 @@ static struct { char *format; } globals; -SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_ident, globals.ident) - SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_level, globals.level) - SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_format, globals.format) - SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_facility, globals.facility) +SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_ident, globals.ident); +SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_level, globals.level); +SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_format, globals.format); +SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_facility, globals.facility); - static switch_loadable_module_interface_t console_module_interface = { - /*.module_name */ modname, - /*.endpoint_interface */ NULL, - /*.timer_interface */ NULL, - /*.dialplan_interface */ NULL, - /*.codec_interface */ NULL, - /*.application_interface */ NULL, - /*.api_interface */ NULL, - /*.file_interface */ NULL, - /*.speech_interface */ NULL, - /*.directory_interface */ NULL - }; +static switch_loadable_module_interface_t console_module_interface = { + /*.module_name */ modname, + /*.endpoint_interface */ NULL, + /*.timer_interface */ NULL, + /*.dialplan_interface */ NULL, + /*.codec_interface */ NULL, + /*.application_interface */ NULL, + /*.api_interface */ NULL, + /*.file_interface */ NULL, + /*.speech_interface */ NULL, + /*.directory_interface */ NULL +}; static switch_status_t mod_syslog_logger(const switch_log_node_t *node, switch_log_level_t level) { diff --git a/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c b/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c index a6aa1c0291..de29b5ea64 100644 --- a/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c +++ b/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c @@ -55,11 +55,11 @@ static struct { char *pass; } globals; -SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_realm, globals.realm) -SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_user, globals.user) -SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_pass, globals.pass) +SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_realm, globals.realm); +SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_user, globals.user); +SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_pass, globals.pass); - static switch_status_t do_config(void) +static switch_status_t do_config(void) { char *cf = "xml_rpc.conf"; switch_xml_t cfg, xml, settings, param; @@ -292,7 +292,7 @@ static xmlrpc_value *freeswitch_api(xmlrpc_env * const envP, xmlrpc_value * cons val = xmlrpc_build_value(envP, "s", "ERROR!"); } -done: + done: /* xmlrpc-c requires us to free memory it malloced from xmlrpc_decompose_value */ switch_safe_free(command); switch_safe_free(arg); @@ -347,7 +347,7 @@ static xmlrpc_value *freeswitch_man(xmlrpc_env * const envP, xmlrpc_value * cons /* Return our result. */ val = xmlrpc_build_value(envP, "s", buf); -done: + done: /* xmlrpc-c requires us to free memory it malloced from xmlrpc_decompose_value */ switch_safe_free(oid); switch_safe_free(s_action);