[Home]

Summary:ASTERISK-11208: Not possible to pass a NULL user or Password into SQLConnect
Reporter:Nick Gorham (lurcher)Labels:
Date Opened:2008-01-11 05:52:20.000-0600Date Closed:2008-01-18 00:49:52.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Resources/res_odbc
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) res_odbc.c.patch
( 1) res_odbc.c.patch1
Description:The way the code extracts the username and password from the res_odbc.ini config file, means that if a username is not specified, with the intention of the driver using a default value specified in the driver manager odbc.ini dsn. The username member is set to a empty string. When the empty string is passed into SQLConnect the fact that its empty and not NULL, means the driver is required to use a empty string as the user name, and not look for a default.

****** ADDITIONAL INFORMATION ******

I will attach a simple patch that fixes this
Comments:By: Nick Gorham (lurcher) 2008-01-11 06:07:20.000-0600

Woops, there was a silly bug in the first patch, another uploaded

By: Digium Subversion (svnbot) 2008-01-18 00:49:52.000-0600

Repository: asterisk
Revision: 99017

U   trunk/res/res_odbc.c

------------------------------------------------------------------------
r99017 | tilghman | 2008-01-18 00:49:50 -0600 (Fri, 18 Jan 2008) | 5 lines

Permit username and password to be NULL (which enables pass-through from the layer above).
Reported by: lurcher
Patch by: tilghman
(Closes issue ASTERISK-11208)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=99017