[asterisk-bugs] [Asterisk 0012069]: func_odbc does not use readhandle for readsql

noreply at bugs.digium.com noreply at bugs.digium.com
Wed Feb 27 09:39:51 CST 2008


The following issue has been RESOLVED. 
====================================================================== 
http://bugs.digium.com/view.php?id=12069 
====================================================================== 
Reported By:                kactus
Assigned To:                Corydon76
====================================================================== 
Project:                    Asterisk
Issue ID:                   12069
Category:                   Functions/func_odbc
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     resolved
Asterisk Version:           1.6.0-beta1 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             02-25-2008 23:15 CST
Last Modified:              02-27-2008 09:39 CST
====================================================================== 
Summary:                    func_odbc does not use readhandle for readsql
Description: 
Hi

When using func_odbc in format

[FUNCTION]
readhandle=database
readsql= select a from b

readsql will never execute unless a writehandle is set with the dns name.
This also occurs whether or not dns=database is set as well.

in the source you can see that stmt is initialised to null at line 254 in
func_odbc.c (function acf_odbc_read) and is only then set on line 313 when
writehandle is being tested.

stmt is then tested on line 319  and if a valid writehandle has not been
found it throw an error and exits the function.

====================================================================== 

---------------------------------------------------------------------- 
 file - 02-27-08 09:39  
---------------------------------------------------------------------- 
This issue was closed because Corydon committed a change which fixed the
issue in question in revision 104125. This change will be in the next beta. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
02-27-08 09:39  file           Note Added: 0083028                          
======================================================================




More information about the asterisk-bugs mailing list