[asterisk-bugs] [Asterisk 0010614]: various coding errors causing more trouble than reasonable

noreply at bugs.digium.com noreply at bugs.digium.com
Thu Aug 30 22:55:27 CDT 2007


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=10614 
====================================================================== 
Reported By:                jontow
Assigned To:                Corydon76
====================================================================== 
Project:                    Asterisk
Issue ID:                   10614
Category:                   CDR/cdr_odbc
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
Asterisk Version:            SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 81402 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             08-30-2007 20:43 CDT
Last Modified:              08-30-2007 22:55 CDT
====================================================================== 
Summary:                    various coding errors causing more trouble than
reasonable
Description: 
Avoid SQLDisconnect() anywhere but odbc_disconnect() (this means in
odbc_log()).

Get the query prepare functions out of odbc_log(), they don't belong there
and it doesn't work: on failure, it'll never succeed because the connection
is trashed and things are never re-prepared after being allocated.

In all of the file, ODBC_res should be of type SQLRETURN, not a normal
int.

In odbc_do_query(), proper error reporting from the ODBC layer doesn't
hurt either; it doesn't crash the drivers if you don't hard-code sizes that
are way too small per the specs and use the correct SQL* types.

No, I don't have a patch that I can post right now, and no, I don't have a
valid disclaimer these days.
====================================================================== 

---------------------------------------------------------------------- 
 Corydon76 - 08-30-07 22:55  
---------------------------------------------------------------------- 
Do you have a specific crash that this is causing? 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
08-30-07 22:55  Corydon76      Note Added: 0069764                          
======================================================================




More information about the asterisk-bugs mailing list