diff --git a/src/mod/applications/mod_enum/mod_enum.c b/src/mod/applications/mod_enum/mod_enum.c index 6ac8094ea1..038ed05600 100644 --- a/src/mod/applications/mod_enum/mod_enum.c +++ b/src/mod/applications/mod_enum/mod_enum.c @@ -733,3 +733,14 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_enum_shutdown) switch_core_hash_destroy(&globals.routes); return SWITCH_STATUS_SUCCESS; } + +/* For Emacs: + * Local Variables: + * mode:c + * indent-tabs-mode:t + * tab-width:4 + * c-basic-offset:4 + * End: + * For VIM: + * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab: + */ diff --git a/src/mod/asr_tts/mod_openmrcp/mod_openmrcp.c b/src/mod/asr_tts/mod_openmrcp/mod_openmrcp.c index d3f391a0b2..90f4e40068 100644 --- a/src/mod/asr_tts/mod_openmrcp/mod_openmrcp.c +++ b/src/mod/asr_tts/mod_openmrcp/mod_openmrcp.c @@ -981,3 +981,14 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_openmrcp_shutdown) openmrcp_destroy(); return SWITCH_STATUS_SUCCESS; } + +/* For Emacs: + * Local Variables: + * mode:c + * indent-tabs-mode:t + * tab-width:4 + * c-basic-offset:4 + * End: + * For VIM: + * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab: + */ diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index d42d208cf2..928ca2cbde 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -2891,3 +2891,14 @@ static void set_variable_sip_param(switch_channel_t *channel, char *header_type, } } + +/* For Emacs: + * Local Variables: + * mode:c + * indent-tabs-mode:t + * tab-width:4 + * c-basic-offset:4 + * End: + * For VIM: + * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab: + */ diff --git a/src/mod/endpoints/mod_sofia/sofia_glue.c b/src/mod/endpoints/mod_sofia/sofia_glue.c index ac58ca1a51..8fc9a51eab 100644 --- a/src/mod/endpoints/mod_sofia/sofia_glue.c +++ b/src/mod/endpoints/mod_sofia/sofia_glue.c @@ -2421,3 +2421,14 @@ int sofia_glue_get_user_host(char *in, char **user, char **host) return 1; } + +/* For Emacs: + * Local Variables: + * mode:c + * indent-tabs-mode:t + * tab-width:4 + * c-basic-offset:4 + * End: + * For VIM: + * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab: + */ diff --git a/src/mod/endpoints/mod_sofia/sofia_reg.c b/src/mod/endpoints/mod_sofia/sofia_reg.c index c5c352b5f0..8f7735cb24 100644 --- a/src/mod/endpoints/mod_sofia/sofia_reg.c +++ b/src/mod/endpoints/mod_sofia/sofia_reg.c @@ -1132,7 +1132,13 @@ switch_status_t sofia_reg_add_gateway(char *key, sofia_gateway_t *gateway) return status; } - - - - +/* For Emacs: + * Local Variables: + * mode:c + * indent-tabs-mode:t + * tab-width:4 + * c-basic-offset:4 + * End: + * For VIM: + * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab: + */ diff --git a/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c b/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c index 298ef565e3..e205abb4de 100644 --- a/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c +++ b/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c @@ -2471,7 +2471,6 @@ static switch_status_t config_wanpipe(int reload) set_global_dialplan("XML"); } - globals.configured_spans = 0; for(current_span = 1; current_span < MAX_SPANS; current_span++) { if (SPANS[current_span]) { @@ -2496,11 +2495,16 @@ static switch_status_t config_wanpipe(int reload) } } - - return SWITCH_STATUS_SUCCESS; - } - - +/* For Emacs: + * Local Variables: + * mode:c + * indent-tabs-mode:t + * tab-width:4 + * c-basic-offset:4 + * End: + * For VIM: + * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab: + */ diff --git a/src/mod/languages/mod_python/mod_python.c b/src/mod/languages/mod_python/mod_python.c index afae73fdee..df25eaa895 100644 --- a/src/mod/languages/mod_python/mod_python.c +++ b/src/mod/languages/mod_python/mod_python.c @@ -331,7 +331,15 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_python_shutdown) } - - - /* Return the number of arguments of the application command line */ + +/* For Emacs: + * Local Variables: + * mode:c + * indent-tabs-mode:t + * tab-width:4 + * c-basic-offset:4 + * End: + * For VIM: + * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab: + */ diff --git a/src/mod/say/mod_say_de/mod_say_de.c b/src/mod/say/mod_say_de/mod_say_de.c index 4f1deebebb..fa1dfdee1c 100644 --- a/src/mod/say/mod_say_de/mod_say_de.c +++ b/src/mod/say/mod_say_de/mod_say_de.c @@ -536,3 +536,14 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_say_de_load) /* indicate that the module should continue to be loaded */ return SWITCH_STATUS_SUCCESS; } + +/* For Emacs: + * Local Variables: + * mode:c + * indent-tabs-mode:t + * tab-width:4 + * c-basic-offset:4 + * End: + * For VIM: + * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab: + */ diff --git a/src/mod/say/mod_say_en/mod_say_en.c b/src/mod/say/mod_say_en/mod_say_en.c index 146eb2542c..beb1cc7790 100644 --- a/src/mod/say/mod_say_en/mod_say_en.c +++ b/src/mod/say/mod_say_en/mod_say_en.c @@ -536,3 +536,14 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_say_en_load) /* indicate that the module should continue to be loaded */ return SWITCH_STATUS_SUCCESS; } + +/* For Emacs: + * Local Variables: + * mode:c + * indent-tabs-mode:t + * tab-width:4 + * c-basic-offset:4 + * End: + * For VIM: + * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab: + */ diff --git a/src/mod/say/mod_say_es/mod_say_es.c b/src/mod/say/mod_say_es/mod_say_es.c index 18d0c3fe4d..3e17a096e8 100644 --- a/src/mod/say/mod_say_es/mod_say_es.c +++ b/src/mod/say/mod_say_es/mod_say_es.c @@ -536,3 +536,14 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_say_es_load) /* indicate that the module should continue to be loaded */ return SWITCH_STATUS_SUCCESS; } + +/* For Emacs: + * Local Variables: + * mode:c + * indent-tabs-mode:t + * tab-width:4 + * c-basic-offset:4 + * End: + * For VIM: + * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab: + */ diff --git a/src/mod/say/mod_say_fr/mod_say_fr.c b/src/mod/say/mod_say_fr/mod_say_fr.c index 71b389ff70..9d26a70147 100644 --- a/src/mod/say/mod_say_fr/mod_say_fr.c +++ b/src/mod/say/mod_say_fr/mod_say_fr.c @@ -536,3 +536,14 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_say_fr_load) /* indicate that the module should continue to be loaded */ return SWITCH_STATUS_SUCCESS; } + +/* For Emacs: + * Local Variables: + * mode:c + * indent-tabs-mode:t + * tab-width:4 + * c-basic-offset:4 + * End: + * For VIM: + * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab: + */ diff --git a/src/mod/say/mod_say_it/mod_say_it.c b/src/mod/say/mod_say_it/mod_say_it.c index 4576e9a863..851dc9a0ad 100644 --- a/src/mod/say/mod_say_it/mod_say_it.c +++ b/src/mod/say/mod_say_it/mod_say_it.c @@ -536,3 +536,14 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_say_it_load) /* indicate that the module should continue to be loaded */ return SWITCH_STATUS_SUCCESS; } + +/* For Emacs: + * Local Variables: + * mode:c + * indent-tabs-mode:t + * tab-width:4 + * c-basic-offset:4 + * End: + * For VIM: + * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab: + */ diff --git a/src/mod/say/mod_say_nl/mod_say_nl.c b/src/mod/say/mod_say_nl/mod_say_nl.c index f2350c9922..30e9ffcd7e 100644 --- a/src/mod/say/mod_say_nl/mod_say_nl.c +++ b/src/mod/say/mod_say_nl/mod_say_nl.c @@ -536,3 +536,14 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_say_nl_load) /* indicate that the module should continue to be loaded */ return SWITCH_STATUS_SUCCESS; } + +/* For Emacs: + * Local Variables: + * mode:c + * indent-tabs-mode:t + * tab-width:4 + * c-basic-offset:4 + * End: + * For VIM: + * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab: + */ diff --git a/src/switch_core_asr.c b/src/switch_core_asr.c index 2498091fde..21d8465658 100644 --- a/src/switch_core_asr.c +++ b/src/switch_core_asr.c @@ -158,3 +158,14 @@ SWITCH_DECLARE(switch_status_t) switch_core_asr_get_results(switch_asr_handle_t return ah->asr_interface->asr_get_results(ah, xmlstr, flags); } + +/* For Emacs: + * Local Variables: + * mode:c + * indent-tabs-mode:t + * tab-width:4 + * c-basic-offset:4 + * End: + * For VIM: + * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab: + */ diff --git a/src/switch_core_directory.c b/src/switch_core_directory.c index 8ee3d75ee9..379f579f52 100644 --- a/src/switch_core_directory.c +++ b/src/switch_core_directory.c @@ -84,3 +84,13 @@ SWITCH_DECLARE(switch_status_t) switch_core_directory_close(switch_directory_han return status; } +/* For Emacs: + * Local Variables: + * mode:c + * indent-tabs-mode:t + * tab-width:4 + * c-basic-offset:4 + * End: + * For VIM: + * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab: + */ diff --git a/src/switch_core_file.c b/src/switch_core_file.c index 85f3e79c28..5a2262483a 100644 --- a/src/switch_core_file.c +++ b/src/switch_core_file.c @@ -299,3 +299,14 @@ SWITCH_DECLARE(switch_status_t) switch_core_file_close(switch_file_handle_t *fh) return status; } + +/* For Emacs: + * Local Variables: + * mode:c + * indent-tabs-mode:t + * tab-width:4 + * c-basic-offset:4 + * End: + * For VIM: + * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab: + */ diff --git a/src/switch_core_hash.c b/src/switch_core_hash.c index 38aafd7a71..0898695ced 100644 --- a/src/switch_core_hash.c +++ b/src/switch_core_hash.c @@ -153,3 +153,14 @@ SWITCH_DECLARE(void) switch_hash_this(switch_hash_index_t *hi, const void **key, *val = sqliteHashData((HashElem *) hi); } } + +/* For Emacs: + * Local Variables: + * mode:c + * indent-tabs-mode:t + * tab-width:4 + * c-basic-offset:4 + * End: + * For VIM: + * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab: + */ diff --git a/src/switch_core_io.c b/src/switch_core_io.c index cc70dbab00..b27f334b3a 100644 --- a/src/switch_core_io.c +++ b/src/switch_core_io.c @@ -1010,3 +1010,14 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_send_dtmf_string(switch_core return sent ? SWITCH_STATUS_SUCCESS : SWITCH_STATUS_FALSE; } + +/* For Emacs: + * Local Variables: + * mode:c + * indent-tabs-mode:t + * tab-width:4 + * c-basic-offset:4 + * End: + * For VIM: + * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab: + */ diff --git a/src/switch_core_media_bug.c b/src/switch_core_media_bug.c index 07307a3314..652620cf9f 100644 --- a/src/switch_core_media_bug.c +++ b/src/switch_core_media_bug.c @@ -348,3 +348,14 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_bug_remove(switch_core_session return status; } + +/* For Emacs: + * Local Variables: + * mode:c + * indent-tabs-mode:t + * tab-width:4 + * c-basic-offset:4 + * End: + * For VIM: + * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab: + */ diff --git a/src/switch_core_rwlock.c b/src/switch_core_rwlock.c index 9278bbb0d0..3f683d3d21 100644 --- a/src/switch_core_rwlock.c +++ b/src/switch_core_rwlock.c @@ -84,3 +84,14 @@ SWITCH_DECLARE(void) switch_core_session_rwunlock(switch_core_session_t *session switch_thread_rwlock_unlock(session->rwlock); } + +/* For Emacs: + * Local Variables: + * mode:c + * indent-tabs-mode:t + * tab-width:4 + * c-basic-offset:4 + * End: + * For VIM: + * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab: + */ diff --git a/src/switch_core_speech.c b/src/switch_core_speech.c index 201dfad774..c074d5c0dc 100644 --- a/src/switch_core_speech.c +++ b/src/switch_core_speech.c @@ -34,7 +34,6 @@ #include #include "private/switch_core_pvt.h" - SWITCH_DECLARE(switch_status_t) switch_core_speech_open(switch_speech_handle_t *sh, const char *module_name, const char *voice_name, @@ -151,3 +150,14 @@ SWITCH_DECLARE(switch_status_t) switch_core_speech_close(switch_speech_handle_t return status; } + +/* For Emacs: + * Local Variables: + * mode:c + * indent-tabs-mode:t + * tab-width:4 + * c-basic-offset:4 + * End: + * For VIM: + * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab: + */ diff --git a/src/switch_core_timer.c b/src/switch_core_timer.c index 8bfaff00c8..c226ac8694 100644 --- a/src/switch_core_timer.c +++ b/src/switch_core_timer.c @@ -114,3 +114,14 @@ SWITCH_DECLARE(switch_status_t) switch_core_timer_destroy(switch_timer_t *timer) return SWITCH_STATUS_SUCCESS; } + +/* For Emacs: + * Local Variables: + * mode:c + * indent-tabs-mode:t + * tab-width:4 + * c-basic-offset:4 + * End: + * For VIM: + * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab: + */ diff --git a/src/switch_ivr_bridge.c b/src/switch_ivr_bridge.c index 88abe4be24..a0a4f58651 100644 --- a/src/switch_ivr_bridge.c +++ b/src/switch_ivr_bridge.c @@ -882,3 +882,14 @@ SWITCH_DECLARE(void) switch_ivr_intercept_session(switch_core_session_t *session switch_ivr_uuid_bridge(switch_core_session_get_uuid(session), uuid); } + +/* For Emacs: + * Local Variables: + * mode:c + * indent-tabs-mode:t + * tab-width:4 + * c-basic-offset:4 + * End: + * For VIM: + * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab: + */ diff --git a/src/switch_ivr_menu.c b/src/switch_ivr_menu.c index 060971cd94..086642dc5c 100644 --- a/src/switch_ivr_menu.c +++ b/src/switch_ivr_menu.c @@ -676,3 +676,14 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_stack_xml_build(switch_ivr_menu_ return status; } + +/* For Emacs: + * Local Variables: + * mode:c + * indent-tabs-mode:t + * tab-width:4 + * c-basic-offset:4 + * End: + * For VIM: + * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab: + */ diff --git a/src/switch_ivr_originate.c b/src/switch_ivr_originate.c index 3e735fb673..567f12492c 100644 --- a/src/switch_ivr_originate.c +++ b/src/switch_ivr_originate.c @@ -1280,3 +1280,14 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess return status; } + +/* For Emacs: + * Local Variables: + * mode:c + * indent-tabs-mode:t + * tab-width:4 + * c-basic-offset:4 + * End: + * For VIM: + * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab: + */ diff --git a/src/switch_ivr_play_say.c b/src/switch_ivr_play_say.c index 282591410b..658470b3a7 100644 --- a/src/switch_ivr_play_say.c +++ b/src/switch_ivr_play_say.c @@ -688,7 +688,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess int stream_id = 0; switch_status_t status = SWITCH_STATUS_SUCCESS; switch_file_handle_t lfh; - switch_codec_t *read_codec = switch_core_session_get_read_codec(session); + switch_codec_t *read_codec = NULL; const char *p; char *title = "", *copyright = "", *software = "", *artist = "", *comment = "", *date = ""; uint8_t asis = 0; @@ -707,8 +707,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess prefix = switch_channel_get_variable(channel, "sound_prefix"); timer_name = switch_channel_get_variable(channel, "timer_name"); + read_codec = switch_core_session_get_read_codec(session); - if (switch_strlen_zero(file)) { + if (switch_strlen_zero(file) || !read_codec) { status = SWITCH_STATUS_FALSE; goto end; } @@ -1662,3 +1663,14 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text(switch_core_session_t *ses switch_core_session_reset(session, SWITCH_TRUE); return status; } + +/* For Emacs: + * Local Variables: + * mode:c + * indent-tabs-mode:t + * tab-width:4 + * c-basic-offset:4 + * End: + * For VIM: + * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab: + */