diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-10-15 17:16:00 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-10-15 17:16:00 +0000 |
commit | 26f51f87176f7f58004cfe36b1901ed6bdfac107 (patch) | |
tree | 6e81b799173cbfd645f9bf081be76db3f8ae5112 /funcs/func_odbc.c | |
parent | e23f5458603121d10c8a3941f96fa324cd469b04 (diff) |
Only set buf to blank before the goto.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@149640 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'funcs/func_odbc.c')
-rw-r--r-- | funcs/func_odbc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/funcs/func_odbc.c b/funcs/func_odbc.c index 37b27d59b..2a4593390 100644 --- a/funcs/func_odbc.c +++ b/funcs/func_odbc.c @@ -452,6 +452,7 @@ static int acf_odbc_read(struct ast_channel *chan, const char *cmd, char *s, cha if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) { ast_log(LOG_WARNING, "SQL Get Data error!\n[%s]\n\n", sql->str); y = -1; + buf[0] = '\0'; goto end_acf_read; } @@ -520,8 +521,6 @@ end_acf_read: } odbc_store->data = resultset; ast_channel_datastore_add(chan, odbc_store); - } else { - buf[0] = '\0'; } SQLCloseCursor(stmt); SQLFreeHandle(SQL_HANDLE_STMT, stmt); |