提交 1ffda2e5 authored 作者: Anthony Minessale's avatar Anthony Minessale 提交者: Ken Rice

fix format

上级 4424a49a
...@@ -336,7 +336,7 @@ SWITCH_DECLARE(switch_odbc_status_t) switch_odbc_handle_connect(switch_odbc_hand ...@@ -336,7 +336,7 @@ SWITCH_DECLARE(switch_odbc_status_t) switch_odbc_handle_connect(switch_odbc_hand
int result; int result;
SQLINTEGER err; SQLINTEGER err;
int16_t mlen; int16_t mlen;
unsigned char msg[200], stat[10]; unsigned char msg[200] = "", stat[10] = "";
SQLSMALLINT valueLength = 0; SQLSMALLINT valueLength = 0;
int i = 0; int i = 0;
...@@ -365,8 +365,8 @@ SWITCH_DECLARE(switch_odbc_status_t) switch_odbc_handle_connect(switch_odbc_hand ...@@ -365,8 +365,8 @@ SWITCH_DECLARE(switch_odbc_status_t) switch_odbc_handle_connect(switch_odbc_hand
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "%s\n", err_str); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "%s\n", err_str);
free(err_str); free(err_str);
} else { } else {
SQLGetDiagRec(SQL_HANDLE_DBC, handle->con, 1, stat, &err, msg, 100, &mlen); SQLGetDiagRec(SQL_HANDLE_DBC, handle->con, 1, stat, &err, msg, sizeof(msg), &mlen);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error SQLConnect=%d errno=%d %s\n", result, (int) err, msg); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error SQLConnect=%d errno=%d [%s]\n", result, (int) err, msg);
} }
/* Deallocate handles again, more chanses to succeed when reconnecting */ /* Deallocate handles again, more chanses to succeed when reconnecting */
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论