]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
mod_portaudio: move load_config a bit lower since it needs to use the hashtables
authorMatrhieu Rene <mrene@avgs.ca>
Tue, 19 Jul 2011 20:14:14 +0000 (16:14 -0400)
committerMatrhieu Rene <mrene@avgs.ca>
Tue, 19 Jul 2011 20:14:14 +0000 (16:14 -0400)
src/mod/endpoints/mod_portaudio/mod_portaudio.c

index 793989a5578b2c43b67894ba340e028509ad0f50..bc4c19b6142246ca216405c612cdc61b94fd8f28 100644 (file)
@@ -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;