summaryrefslogtreecommitdiff
path: root/res/res_config_odbc.c
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2008-12-13 08:36:35 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2008-12-13 08:36:35 +0000
commitc8223fc9578754dfaef1b337e5f0dfff546461b4 (patch)
tree0559c99680217b78c0bda37a131b5f09794f43c6 /res/res_config_odbc.c
parent3b96ae826e7e280bff1d16ddc50d9328c7ea70ac (diff)
Merge ast_str_opaque branch (discontinue usage of ast_str internals)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_config_odbc.c')
-rw-r--r--res/res_config_odbc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/res/res_config_odbc.c b/res/res_config_odbc.c
index a815a9de9..8de431475 100644
--- a/res/res_config_odbc.c
+++ b/res/res_config_odbc.c
@@ -555,9 +555,9 @@ static SQLHSTMT update2_prepare(struct odbc_obj *obj, void *data)
/* Done with the table metadata */
ast_odbc_release_table(tableptr);
- res = SQLPrepare(stmt, (unsigned char *)sql->str, SQL_NTS);
+ res = SQLPrepare(stmt, (unsigned char *)ast_str_buffer(sql), SQL_NTS);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
- ast_log(LOG_WARNING, "SQL Prepare failed![%s]\n", sql->str);
+ ast_log(LOG_WARNING, "SQL Prepare failed![%s]\n", ast_str_buffer(sql));
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
return NULL;
}
@@ -606,7 +606,7 @@ static int update2_odbc(const char *database, const char *table, va_list ap)
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
/* Since only a single thread can access this memory, we can retrieve what would otherwise be lost. */
sql = ast_str_thread_get(&sql_buf, 16);
- ast_log(LOG_WARNING, "SQL Row Count error!\n[%s]\n", sql->str);
+ ast_log(LOG_WARNING, "SQL Row Count error!\n[%s]\n", ast_str_buffer(sql));
return -1;
}