From 67b3210a31928b76c61d02a338f91ab72d95cfa8 Mon Sep 17 00:00:00 2001 From: Jeff Lenk Date: Tue, 17 Nov 2009 01:31:12 +0000 Subject: [PATCH] fix compiler error git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15489 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/applications/mod_easyroute/mod_easyroute.c | 2 +- src/mod/applications/mod_lcr/mod_lcr.c | 2 +- src/mod/applications/mod_nibblebill/mod_nibblebill.c | 2 +- src/mod/formats/mod_shout/mod_shout.c | 6 ++++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/mod/applications/mod_easyroute/mod_easyroute.c b/src/mod/applications/mod_easyroute/mod_easyroute.c index 24ad56fb15..2d78e46ce4 100644 --- a/src/mod/applications/mod_easyroute/mod_easyroute.c +++ b/src/mod/applications/mod_easyroute/mod_easyroute.c @@ -204,7 +204,7 @@ static switch_status_t route_lookup(char *dn, easyroute_results_t *results, int switch_mutex_lock(globals.mutex); } /* Do the Query */ - if (switch_odbc_handle_callback_exec(globals.master_odbc, sql, route_callback, &pdata) == SWITCH_ODBC_SUCCESS){ + if (switch_odbc_handle_callback_exec(globals.master_odbc, sql, route_callback, &pdata, NULL) == SWITCH_ODBC_SUCCESS){ char tmp_profile[129]; char tmp_gateway[129]; diff --git a/src/mod/applications/mod_lcr/mod_lcr.c b/src/mod/applications/mod_lcr/mod_lcr.c index e3182fb6d3..f1fe391072 100644 --- a/src/mod/applications/mod_lcr/mod_lcr.c +++ b/src/mod/applications/mod_lcr/mod_lcr.c @@ -526,7 +526,7 @@ static switch_bool_t lcr_execute_sql_callback(char *sql, switch_core_db_callback switch_mutex_lock(globals.db_mutex); if (globals.odbc_dsn) { - if (switch_odbc_handle_callback_exec(globals.master_odbc, sql, callback, pdata) + if (switch_odbc_handle_callback_exec(globals.master_odbc, sql, callback, pdata, NULL) == SWITCH_ODBC_FAIL) { retval = SWITCH_FALSE; } else { diff --git a/src/mod/applications/mod_nibblebill/mod_nibblebill.c b/src/mod/applications/mod_nibblebill/mod_nibblebill.c index 196a29014f..6b84e1a0a5 100644 --- a/src/mod/applications/mod_nibblebill/mod_nibblebill.c +++ b/src/mod/applications/mod_nibblebill/mod_nibblebill.c @@ -338,7 +338,7 @@ static float get_balance(const char *billaccount) memset(&pdata, 0, sizeof(pdata)); snprintf(sql, 1024, SQL_LOOKUP, globals.db_column_cash, globals.db_table, globals.db_column_account, billaccount); - if (switch_odbc_handle_callback_exec(globals.master_odbc, sql, nibblebill_callback, &pdata) != SWITCH_ODBC_SUCCESS) { + if (switch_odbc_handle_callback_exec(globals.master_odbc, sql, nibblebill_callback, &pdata, NULL) != SWITCH_ODBC_SUCCESS) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error running this query: [%s]\n", sql); /* Return -1 for safety */ diff --git a/src/mod/formats/mod_shout/mod_shout.c b/src/mod/formats/mod_shout/mod_shout.c index 02d2cd4406..ef6f156568 100644 --- a/src/mod/formats/mod_shout/mod_shout.c +++ b/src/mod/formats/mod_shout/mod_shout.c @@ -1319,11 +1319,13 @@ void do_broadcast(switch_stream_handle_t *stream) void do_index(switch_stream_handle_t *stream) { - switch_core_db_t *db = switch_core_db_handle(); + switch_cache_db_handle_t *db; const char *sql = "select * from channels"; struct holder holder; char *errmsg; + switch_core_db_handle(&db); + holder.host = switch_event_get_header(stream->param_event, "http-host"); holder.port = switch_event_get_header(stream->param_event, "http-port"); holder.uri = switch_event_get_header(stream->param_event, "http-uri"); @@ -1335,7 +1337,7 @@ void do_index(switch_stream_handle_t *stream) "%s%s%s%s%s%s%s%s%s\n", "Created", "CID Name", "CID Num", "Ext", "App", "Data", "Codec", "Rate", "Listen"); - switch_core_db_exec(db, sql, web_callback, &holder, &errmsg); + switch_cache_db_execute_sql_callback(db, sql, web_callback, &holder, &errmsg); stream->write_function(stream, "");