mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 20:04:50 +00:00
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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user