mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-05-02 14:48:22 +00:00
Enable mod_lua to use native pgsql dbh support
This commit is contained in:
parent
bfe3fdf347
commit
2cea7f0ff6
@ -342,6 +342,12 @@ Dbh::Dbh(char *dsn, char *user, char *pass)
|
|||||||
if (switch_cache_db_get_db_handle(&dbh, SCDB_TYPE_CORE_DB, &options) == SWITCH_STATUS_SUCCESS) {
|
if (switch_cache_db_get_db_handle(&dbh, SCDB_TYPE_CORE_DB, &options) == SWITCH_STATUS_SUCCESS) {
|
||||||
m_connected = true;
|
m_connected = true;
|
||||||
}
|
}
|
||||||
|
} else if (!strncasecmp(dsn, "pgsql://", 8)) {
|
||||||
|
type = SCDB_TYPE_PGSQL;
|
||||||
|
options.pgsql_options.dsn = (char *)(dsn + 8);
|
||||||
|
if (switch_cache_db_get_db_handle(&dbh, SCDB_TYPE_PGSQL, &options) == SWITCH_STATUS_SUCCESS) {
|
||||||
|
m_connected = true;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
options.odbc_options.dsn = dsn;
|
options.odbc_options.dsn = dsn;
|
||||||
options.odbc_options.user = user;
|
options.odbc_options.user = user;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user