]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Use the readhandle for reads (closes issue #12069)
authorTilghman Lesher <tilghman@meg.abyt.es>
Tue, 26 Feb 2008 06:43:16 +0000 (06:43 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Tue, 26 Feb 2008 06:43:16 +0000 (06:43 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104125 65c4cc65-6c06-0410-ace0-fbb531ad65f3

funcs/func_odbc.c

index af4bab06979da99ae1ea3cfa62dc911d43c18a38..fe7e9896dbb65a1146a191763c818839496ae7cd 100644 (file)
@@ -307,8 +307,8 @@ static int acf_odbc_read(struct ast_channel *chan, const char *cmd, char *s, cha
        AST_LIST_UNLOCK(&queries);
 
        for (dsn = 0; dsn < 5; dsn++) {
-               if (!ast_strlen_zero(query->writehandle[dsn])) {
-                       obj = ast_odbc_request_obj(query->writehandle[dsn], 0);
+               if (!ast_strlen_zero(query->readhandle[dsn])) {
+                       obj = ast_odbc_request_obj(query->readhandle[dsn], 0);
                        if (obj)
                                stmt = ast_odbc_direct_execute(obj, generic_execute, sql);
                }