From: Matrhieu Rene Date: Tue, 19 Jul 2011 20:14:14 +0000 (-0400) Subject: mod_portaudio: move load_config a bit lower since it needs to use the hashtables X-Git-Tag: v1.2-rc1~103^2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1529c0ec8a99643d9884d100e24437a25f647624;p=thirdparty%2Ffreeswitch.git mod_portaudio: move load_config a bit lower since it needs to use the hashtables --- diff --git a/src/mod/endpoints/mod_portaudio/mod_portaudio.c b/src/mod/endpoints/mod_portaudio/mod_portaudio.c index 793989a557..bc4c19b614 100644 --- a/src/mod/endpoints/mod_portaudio/mod_portaudio.c +++ b/src/mod/endpoints/mod_portaudio/mod_portaudio.c @@ -1311,10 +1311,6 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_portaudio_load) memset(&globals, 0, sizeof(globals)); - if ((status = load_config()) != SWITCH_STATUS_SUCCESS) { - return status; - } - switch_core_hash_init(&globals.call_hash, module_pool); switch_core_hash_init(&globals.sh_streams, module_pool); switch_core_hash_init(&globals.endpoints, module_pool); @@ -1336,6 +1332,10 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_portaudio_load) globals.dual_streams = 0; #endif + if ((status = load_config()) != SWITCH_STATUS_SUCCESS) { + return status; + } + if (dump_info(0)) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't find any audio devices!\n"); return SWITCH_STATUS_TERM;