]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
move function into more logical file
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 2 Dec 2009 02:00:17 +0000 (02:00 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 2 Dec 2009 02:00:17 +0000 (02:00 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15750 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_core.c
src/switch_core_sqldb.c

index b0d24dfe58323da1ae29ebaff6e4891b6c842b62..c19273b4eacbee812723ea355c95ed7ff47f0be0 100644 (file)
@@ -1464,27 +1464,6 @@ static void switch_load_core_config(const char *file)
 
 }
 
-#define SWITCH_CORE_DB "core"
-/*!
-  \brief Open the default system database
-*/
-SWITCH_DECLARE(switch_status_t) _switch_core_db_handle(switch_cache_db_handle_t **dbh, const char *file, const char *func, int line)
-{
-       switch_cache_db_connection_options_t options = { {0} };
-
-       if (runtime.odbc_dsn && runtime.odbc_user && runtime.odbc_pass) {
-               options.odbc_options.dsn = runtime.odbc_dsn;
-               options.odbc_options.user = runtime.odbc_user;
-               options.odbc_options.pass = runtime.odbc_pass;
-
-               return _switch_cache_db_get_db_handle(dbh, SCDB_TYPE_ODBC, &options, file, func, line);
-       } else {
-               options.core_db_options.db_path = SWITCH_CORE_DB;
-               return _switch_cache_db_get_db_handle(dbh, SCDB_TYPE_CORE_DB, &options, file, func, line);
-       }
-}
-
-
 SWITCH_DECLARE(switch_status_t) switch_core_init_and_modload(switch_core_flag_t flags, switch_bool_t console, const char **err)
 {
        switch_event_t *event;
index f65fdfb1ab5837b700691b7219ef7abdd685f6d3..6c746006fb8cb51c4222df64d819ae8b4431886a 100644 (file)
 #include <switch.h>
 #include "private/switch_core_pvt.h"
 
+
+#define SWITCH_CORE_DB "core"
+/*!
+  \brief Open the default system database
+*/
+SWITCH_DECLARE(switch_status_t) _switch_core_db_handle(switch_cache_db_handle_t **dbh, const char *file, const char *func, int line)
+{
+       switch_cache_db_connection_options_t options = { {0} };
+
+       if (runtime.odbc_dsn && runtime.odbc_user && runtime.odbc_pass) {
+               options.odbc_options.dsn = runtime.odbc_dsn;
+               options.odbc_options.user = runtime.odbc_user;
+               options.odbc_options.pass = runtime.odbc_pass;
+
+               return _switch_cache_db_get_db_handle(dbh, SCDB_TYPE_ODBC, &options, file, func, line);
+       } else {
+               options.core_db_options.db_path = SWITCH_CORE_DB;
+               return _switch_cache_db_get_db_handle(dbh, SCDB_TYPE_CORE_DB, &options, file, func, line);
+       }
+}
+
+
 static struct {
        switch_cache_db_handle_t *event_db;
        switch_queue_t *sql_queue[2];