[Home]

Summary:ASTERISK-11008: [patch] Don't query without connection and fix of debug messages
Reporter:Igor Goncharovsky (igorg)Labels:
Date Opened:2007-12-10 23:58:42.000-0600Date Closed:2007-12-12 10:55:30.000-0600
Priority:TrivialRegression?No
Status:Closed/CompleteComponents:Addons/cdr_mysql
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) mysqlnoconnect.v1.diff
Description:While not using unix socket for connection with mysql because issue I have discovered and fixed some in cdr_addon_mysql:

- Do not prepare and try to query database if not connected
- If connection to database failed, show additional mysql error number with error text
- Remove from debug and error messages "cdr_mysql:" because all debug and error messages include module name, that cause message in CLI
- Add note about how to connect localhost mysql database over network, without using unix socket. This is trivial, but can help someone.
Comments:By: Digium Subversion (svnbot) 2007-12-12 10:55:30.000-0600

Repository: asterisk-addons
Revision: 495

U   trunk/cdr_addon_mysql.c
U   trunk/configs/cdr_mysql.conf.sample

------------------------------------------------------------------------
r495 | mmichelson | 2007-12-12 10:55:29 -0600 (Wed, 12 Dec 2007) | 10 lines

A few changes:

1. remove "cdr_mysql:" from console messages since the module name is printed in the message already
2. Improve efficiency by not building queries if not connected to the database
3. Add MySQL error number and text for failure to connect to the database
4. Add a clarification to cdr_mysql.conf.sample to indicate that 127.0.0.1 may be used instead of "localhost"

(closes issue ASTERISK-11008, reported and patched by IgorG)


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

http://svn.digium.com/view/asterisk-addons?view=rev&revision=495