ast_str_SQLGetData is *not* part of the ast_str API, it's part of the ast_odbc API and just happens to use an ast_str as the buffer; move all of it to res_odbc.c and res_odbc.h, renaming appropriately

along the way fix some minor coding style issues in strings.h and add some attribute_pure annotations to functions in the ast_str API



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@169438 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2009-01-19 21:42:46 +00:00
parent fae3ba7421
commit 1c2911f5a1
4 changed files with 46 additions and 51 deletions

View File

@@ -30,7 +30,6 @@
<depend>res_odbc</depend>
***/
#define USE_ODBC
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
@@ -543,7 +542,7 @@ static int acf_odbc_read(struct ast_channel *chan, const char *cmd, char *s, cha
}
buflen = strlen(buf);
res = ast_str_SQLGetData(&coldata, -1, stmt, x + 1, SQL_CHAR, &indicator);
res = ast_odbc_ast_str_SQLGetData(&coldata, -1, stmt, x + 1, SQL_CHAR, &indicator);
if (indicator == SQL_NULL_DATA) {
ast_debug(3, "Got NULL data\n");
ast_str_reset(coldata);
@@ -1093,7 +1092,7 @@ static char *cli_odbc_read(struct ast_cli_entry *e, int cmd, struct ast_cli_args
snprintf(colname, sizeof(colname), "field%d", x);
}
res = ast_str_SQLGetData(&coldata, maxcol, stmt, x + 1, SQL_CHAR, &indicator);
res = ast_odbc_ast_str_SQLGetData(&coldata, maxcol, stmt, x + 1, SQL_CHAR, &indicator);
if (indicator == SQL_NULL_DATA) {
ast_str_set(&coldata, 0, "(nil)");
res = SQL_SUCCESS;