From 4bbd9a4c0fd9ad4c23921197dc92a63c75656f21 Mon Sep 17 00:00:00 2001 From: Jeff Lenk Date: Mon, 8 Nov 2010 08:05:23 -0600 Subject: [PATCH 1/3] FS-2825 add additional info when fail --- src/switch_core_sqldb.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/switch_core_sqldb.c b/src/switch_core_sqldb.c index 9551e5dea2..509d989581 100644 --- a/src/switch_core_sqldb.c +++ b/src/switch_core_sqldb.c @@ -702,8 +702,11 @@ SWITCH_DECLARE(switch_status_t) switch_cache_db_persistant_execute_trans(switch_ if (runtime.odbc_dbtype == DBTYPE_DEFAULT) { switch_cache_db_execute_sql_real(dbh, "BEGIN", &errmsg); } else { - if (switch_odbc_SQLSetAutoCommitAttr(dbh->native_handle.odbc_dbh, 0) != SWITCH_ODBC_SUCCESS) { - errmsg = strdup("Unable to Set AutoCommit Off.");; + switch_odbc_status_t result; + if ((result = switch_odbc_SQLSetAutoCommitAttr(dbh->native_handle.odbc_dbh, 0)) != SWITCH_ODBC_SUCCESS) { + char tmp[100]; + switch_snprintf(tmp, sizeof(tmp), "%s-%i", "Unable to Set AutoCommit Off", result); + errmsg = strdup(tmp); } } From 10119e9e88b0021c36558172cce1f3a7da0c88d5 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 8 Nov 2010 10:13:35 -0600 Subject: [PATCH 2/3] FS-2824 --- src/mod/endpoints/mod_sofia/mod_sofia.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index aa927bfd45..3c8404dd6b 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -2208,6 +2208,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi SIPTAG_CONTACT_STR(tech_pvt->reply_contact), SOATAG_REUSE_REJECTED(1), SOATAG_ORDERED_USER(1), + SOATAG_RTP_SELECT(1), SOATAG_ADDRESS(tech_pvt->adv_sdp_audio_ip), SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str), SOATAG_AUDIO_AUX("cn telephone-event"), TAG_IF(call_info, SIPTAG_CALL_INFO_STR(call_info)), From 5875905285309a89d1e83463560d8ba93f247512 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 8 Nov 2010 10:14:46 -0600 Subject: [PATCH 3/3] FS-2827 --- src/mod/event_handlers/mod_event_socket/mod_event_socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mod/event_handlers/mod_event_socket/mod_event_socket.c b/src/mod/event_handlers/mod_event_socket/mod_event_socket.c index be417600a2..941db22c84 100644 --- a/src/mod/event_handlers/mod_event_socket/mod_event_socket.c +++ b/src/mod/event_handlers/mod_event_socket/mod_event_socket.c @@ -1363,7 +1363,7 @@ static void *SWITCH_THREAD_FUNC api_exec(switch_thread_t *thread, void *obj) if (acs->console_execute) { if ((status = switch_console_execute(acs->api_cmd, 0, &stream)) != SWITCH_STATUS_SUCCESS) { - stream.write_function(&stream, "%s: Command not found!\n", acs->api_cmd); + stream.write_function(&stream, "-ERR %s Command not found!\n", acs->api_cmd); } } else { status = switch_api_execute(acs->api_cmd, acs->arg, NULL, &stream); @@ -1372,7 +1372,7 @@ static void *SWITCH_THREAD_FUNC api_exec(switch_thread_t *thread, void *obj) if (status == SWITCH_STATUS_SUCCESS) { reply = stream.data; } else { - freply = switch_mprintf("%s: Command not found!\n", acs->api_cmd); + freply = switch_mprintf("-ERR %s Command not found!\n", acs->api_cmd); reply = freply; }