Modified: freeswitch/trunk/contrib/ledr/c/mod_odbc_query/mod_odbc_query.c (14859 => 14860)
--- freeswitch/trunk/contrib/ledr/c/mod_odbc_query/mod_odbc_query.c 2009-09-14 23:16:01 UTC (rev 14859)
+++ freeswitch/trunk/contrib/ledr/c/mod_odbc_query/mod_odbc_query.c 2009-09-14 23:18:02 UTC (rev 14860)
@@ -207,6 +207,12 @@
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "ODBC Query module loading...\n");
+ /* check if core odbc is available */
+ if (!switch_odbc_available()) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No core ODBC available!\n");
+ return SWITCH_STATUS_FALSE;
+ }
+
/* allocate the queries hash */
if (switch_core_hash_init(&globals.queries_hash, globals.pool) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error initializing the queries hash\n");