[asterisk-dev] res/res_odbc.c

Nick Gorham nick at lurcher.org
Mon Nov 5 03:49:16 CST 2007


Hi,

I hope this is the right place for this. I have what I think is a simple 
fix for what I believe is a problem in the 1.4 trunk code.

If a "odbc show" is issued against a ODBC driver that only supports a 
single active statement, the test query (or default select 1) can hit 
the existing active statement, cauing it all to go horribly wrong.

The simple solution (It seems to me) is to use the ODBC 
SQLGetConnectAttr( SQL_CONNECTION_DEAD ) methode of checking the status 
of the driver. This seems to work fine against SQLServer using our 
(Easysoft's) driver, but it may need checking how well it works against 
other drivers.

I have made the changes against the current (02/11/07) 1.4 trunk and I 
can send the output from "svn diff" if that helps.

-- 
Nick Gorham



More information about the asterisk-dev mailing list