Merge branch 'master' of git://git.freeswitch.org/freeswitch

This commit is contained in:
Anthony Minessale 2012-10-12 17:05:24 -04:00
commit 10544a9642
2 changed files with 9 additions and 4 deletions

View File

@ -790,6 +790,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_perform_receive_message(swit
if (switch_channel_up_nosig(session->channel)) { if (switch_channel_up_nosig(session->channel)) {
if (message->message_id == SWITCH_MESSAGE_INDICATE_BRIDGE || message->message_id == SWITCH_MESSAGE_INDICATE_UNBRIDGE) { if (message->message_id == SWITCH_MESSAGE_INDICATE_BRIDGE || message->message_id == SWITCH_MESSAGE_INDICATE_UNBRIDGE) {
switch_core_media_bug_flush_all(session); switch_core_media_bug_flush_all(session);
switch_core_recovery_track(session);
} }
switch (message->message_id) { switch (message->message_id) {

View File

@ -318,16 +318,16 @@ SWITCH_DECLARE(switch_status_t) _switch_cache_db_get_db_handle_dsn(switch_cache_
switch_status_t status = SWITCH_STATUS_FALSE; switch_status_t status = SWITCH_STATUS_FALSE;
int i; int i;
if (!strncmp(dsn, "pgsql;", 6)) { if (!strncasecmp(dsn, "pgsql://", 8)) {
type = SCDB_TYPE_PGSQL; type = SCDB_TYPE_PGSQL;
connection_options.pgsql_options.dsn = (char *)(dsn + 6); connection_options.pgsql_options.dsn = (char *)(dsn + 8);
} else if ((!(i = strncmp(dsn, "odbc;", 6))) || strchr(dsn, ':')) { } else if ((!(i = strncasecmp(dsn, "odbc://", 8))) || strchr(dsn, ':')) {
type = SCDB_TYPE_ODBC; type = SCDB_TYPE_ODBC;
if (i) { if (i) {
switch_set_string(tmp, dsn); switch_set_string(tmp, dsn);
} else { } else {
switch_set_string(tmp, dsn+6); switch_set_string(tmp, dsn+8);
} }
connection_options.odbc_options.dsn = tmp; connection_options.odbc_options.dsn = tmp;
@ -344,6 +344,10 @@ SWITCH_DECLARE(switch_status_t) _switch_cache_db_get_db_handle_dsn(switch_cache_
} }
} else { } else {
if (!strncasecmp(dsn, "sqlite://", 9)) {
dsn += 9;
}
type = SCDB_TYPE_CORE_DB; type = SCDB_TYPE_CORE_DB;
connection_options.core_db_options.db_path = (char *)dsn; connection_options.core_db_options.db_path = (char *)dsn;
} }