diff --git a/src/mod/codecs/mod_g726/mod_g726.c b/src/mod/codecs/mod_g726/mod_g726.c index 6a14fbbf25..f62f1029bb 100644 --- a/src/mod/codecs/mod_g726/mod_g726.c +++ b/src/mod/codecs/mod_g726/mod_g726.c @@ -368,50 +368,48 @@ static switch_codec_implementation_t aal2_g726_40k_implementation = { /*.destroy */ switch_g726_destroy, }; -const switch_codec_interface_t g726_16k_codec_interface = { +static switch_codec_interface_t g726_16k_codec_interface = { /*.interface_name */ "G.726 16k", /*.implementations */ &g726_16k_implementation, }; -const switch_codec_interface_t g726_24k_codec_interface = { +static switch_codec_interface_t g726_24k_codec_interface = { /*.interface_name */ "G.726 24k", /*.implementations */ &g726_24k_implementation, /*.next */ &g726_16k_codec_interface }; -const switch_codec_interface_t g726_32k_codec_interface = { +static switch_codec_interface_t g726_32k_codec_interface = { /*.interface_name */ "G.726 32k", /*.implementations */ &g726_32k_implementation, /*.next */ &g726_24k_codec_interface }; -const switch_codec_interface_t g726_40k_codec_interface = { +static switch_codec_interface_t g726_40k_codec_interface = { /*.interface_name */ "G.726 40k", /*.implementations */ &g726_40k_implementation, /*.next */ &g726_32k_codec_interface }; - - -const switch_codec_interface_t aal2_g726_16k_codec_interface = { +static switch_codec_interface_t aal2_g726_16k_codec_interface = { /*.interface_name */ "G.726 16k (aal2)", /*.implementations */ &aal2_g726_16k_implementation, /*.next */ &g726_40k_codec_interface }; -const switch_codec_interface_t aal2_g726_24k_codec_interface = { +static switch_codec_interface_t aal2_g726_24k_codec_interface = { /*.interface_name */ "G.726 24k (aal2)", /*.implementations */ &aal2_g726_24k_implementation, /*.next */ &aal2_g726_16k_codec_interface }; -const switch_codec_interface_t aal2_g726_32k_codec_interface = { +static switch_codec_interface_t aal2_g726_32k_codec_interface = { /*.interface_name */ "G.726 32k (aal2)", /*.implementations */ &aal2_g726_32k_implementation, /*.next */ &aal2_g726_24k_codec_interface }; -const switch_codec_interface_t aal2_g726_40k_codec_interface = { +static switch_codec_interface_t aal2_g726_40k_codec_interface = { /*.interface_name */ "G.726 40k (aal2)", /*.implementations */ &aal2_g726_40k_implementation, /*.next */ &aal2_g726_32k_codec_interface diff --git a/src/mod/event_handlers/mod_cdr/mod_cdr.cpp b/src/mod/event_handlers/mod_cdr/mod_cdr.cpp index 0761e5a343..090ee4705a 100644 --- a/src/mod/event_handlers/mod_cdr/mod_cdr.cpp +++ b/src/mod/event_handlers/mod_cdr/mod_cdr.cpp @@ -108,7 +108,7 @@ static switch_api_interface_t modcdr_reload_interface_api = { /*.next */ &modcdr_queue_pause_api }; -static const switch_loadable_module_interface_t cdr_module_interface = { +static switch_loadable_module_interface_t cdr_module_interface = { /*.module_name */ modname, /*.endpoint_interface */ NULL, /*.timer_interface */ NULL, diff --git a/src/switch_loadable_module.c b/src/switch_loadable_module.c index 148bea1d1c..b46a68a1c1 100644 --- a/src/switch_loadable_module.c +++ b/src/switch_loadable_module.c @@ -1348,7 +1348,7 @@ SWITCH_DECLARE(switch_loadable_module_interface_t *) switch_loadable_module_crea return mod; } -#define ALLOC_INTERFACE(_TYPE_) do { \ +#define ALLOC_INTERFACE(_TYPE_) for(;;) { \ switch_##_TYPE_##_interface_t *i, *ptr; \ i = switch_core_alloc(mod->pool, sizeof(switch_##_TYPE_##_interface_t)); \ assert(i != NULL); \ @@ -1359,7 +1359,7 @@ SWITCH_DECLARE(switch_loadable_module_interface_t *) switch_loadable_module_crea mod->_TYPE_##_interface = i; \ } \ \ - return i; } while(0) + return i; } SWITCH_DECLARE(void *) switch_loadable_module_create_interface(switch_loadable_module_interface_t *mod, switch_module_interface_name_t iname)