Revision
15519
Author
ledr
Date
2009-11-18 08:28:26 -0600 (Wed, 18 Nov 2009)

Log Message

that doesn't work

Modified Paths

Diff

Modified: freeswitch/trunk/contrib/ledr/c/mod_odbc_query/mod_odbc_query.c (15518 => 15519)


--- freeswitch/trunk/contrib/ledr/c/mod_odbc_query/mod_odbc_query.c	2009-11-18 04:12:54 UTC (rev 15518)
+++ freeswitch/trunk/contrib/ledr/c/mod_odbc_query/mod_odbc_query.c	2009-11-18 14:28:26 UTC (rev 15519)
@@ -167,7 +167,6 @@
 	char *expanded_query = NULL;
 	switch_channel_t *channel = switch_core_session_get_channel(session);
 	switch_memory_pool_t *pool = switch_core_session_get_pool(session);
-	char *errmsg;
 
 	if (!channel) {
 		return;
@@ -191,10 +190,8 @@
 
 	switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Performing query: [%s]\n", expanded_query);
 
-	if (switch_odbc_handle_callback_exec(globals.odbc_handle, expanded_query, odbc_query_callback, channel, &errmsg) != SWITCH_ODBC_SUCCESS) {
-		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "SQL error [%s] while doing query: [%s]\n", switch_str_nil(errmsg), expanded_query);
-		switch_core_db_free(errmsg);
-		errmsg = NULL;
+	if (switch_odbc_handle_callback_exec(globals.odbc_handle, expanded_query, odbc_query_callback, channel, NULL) != SWITCH_ODBC_SUCCESS) {
+		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "SQL error while doing query: [%s]\n", expanded_query);
 	}
 }
 

Modified: freeswitch/trunk/contrib/mod/xml_int/mod_xml_odbc/mod_xml_odbc.c (15518 => 15519)


--- freeswitch/trunk/contrib/mod/xml_int/mod_xml_odbc/mod_xml_odbc.c	2009-11-18 04:12:54 UTC (rev 15518)
+++ freeswitch/trunk/contrib/mod/xml_int/mod_xml_odbc/mod_xml_odbc.c	2009-11-18 14:28:26 UTC (rev 15519)
@@ -232,7 +232,6 @@
 	char *value = (char *) switch_xml_attr_soft(helper->xml_in_cur, "value");
 	char *empty_result_break_to = (char *) switch_xml_attr_soft(helper->xml_in_cur, "on-empty-result-break-to");
 	char *new_value = switch_event_expand_headers_by_pool(helper->pool, helper->event, value);
-	char *errmsg;
 	switch_status_t status = SWITCH_STATUS_FALSE;
 
 	if (globals.debug == SWITCH_TRUE) {
@@ -241,10 +240,8 @@
 
 	helper->rowcount = 0;
 
-	if (switch_odbc_handle_callback_exec(globals.master_odbc, new_value, xml_odbc_query_callback, helper, &errmsg) != SWITCH_ODBC_SUCCESS) {
-		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "SQL error [%s] while doing query [%s]\n", switch_str_nil(errmsg), new_value);
-		switch_core_db_free(errmsg);
-		errmsg = NULL;
+	if (switch_odbc_handle_callback_exec(globals.master_odbc, new_value, xml_odbc_query_callback, helper, NULL) != SWITCH_ODBC_SUCCESS) {
+		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "SQL error while doing query [%s]\n", new_value);
 		goto done;
 	}