[Home]

Summary:ASTERISK-04355: [patch] If no username/password is specified in cdr_odbc.conf, use NULL
Reporter:Jason Parker (jparker)Labels:
Date Opened:2005-06-05 22:28:24Date Closed:2008-01-15 15:37:20.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:CDR/cdr_odbc
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) cdr-20050605-2000-head.diff
Description:In SQLConnect, if you pass in a NULL username and password, it will pull the values from odbc.ini.

Currently, if you don't have anything specified in cdr_odbc.conf, it will set username to root, and password to an empty string.  If you have a database setup like this, you have pretty big problems...

I'd say app_voicemail (res_odbc) does it the right way, so I've created this patch to mimic that behavior.

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

Disclaimer on file, under A.K.A. North Antara.

 == Parsing '/etc/asterisk/cdr_odbc.conf': Found
   -- cdr_odbc: dsn is myodbc-asterisk
   -- cdr_odbc: retreiving username and password from odbc config
   -- cdr_odbc: table is cdr
      > cdr_odbc: Connected to myodbc-asterisk
   -- Starting simple switch on 'Zap/1-1'
   -- Executing VoiceMailMain("Zap/1-1", "s6257") in new stack
   -- Playing 'vm-youhave' (language 'en')
   -- Playing 'vm-no' (language 'en')
   -- Playing 'vm-messages' (language 'en')
   -- Playing 'vm-opts' (language 'en')
 == Spawn extension (default, 8500, 1) exited non-zero on 'Zap/1-1'
      > cdr_odbc: Query Successful!
   -- Hungup 'Zap/1-1'
Comments:By: Kevin P. Fleming (kpfleming) 2005-06-05 22:40:42

Committed to CVS HEAD, thanks!

By: Digium Subversion (svnbot) 2008-01-15 15:37:20.000-0600

Repository: asterisk
Revision: 5854

U   trunk/cdr/cdr_odbc.c

------------------------------------------------------------------------
r5854 | kpfleming | 2008-01-15 15:37:20 -0600 (Tue, 15 Jan 2008) | 2 lines

let ODBC username/password default to the ones in odbc.ini (bug ASTERISK-4355)

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

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