Skip to Content.
Sympa Menu

freetds - bugs with dbopen and error messages

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Mark J. Lilback" <mark AT lilback.com>
  • To: freetds mailing list <freetds AT franklin.oit.unc.edu>
  • Subject: bugs with dbopen and error messages
  • Date: Thu, 30 Aug 2001 14:20:10 -0400


Error handlers are never called when a login fails using dblib (with
TDS 4.2, but it looks like the same thing would happen with other
versions).

tds_process_msg only calls the global error/message handler if
tds->parent is set. But dbopen doesn't set the parent until after
tds_connect is called, which is where the error happens.

Also, while looking at this problem, I noticed another problem.
dbopen allocates memory for a dbproc structure, but if tds_connect
fails, it just returns NULL, leaking the memory.

That's an easy fix, but I'm not sure what to do about the error
message problem. And that is something that has to get fixed --
users need an explanation of why the login failed.

Any ideas on how to creatively work around this?

I can't think of an easy way to do this within the current API, and
I'd prefer to find a solution that does so. (I don't mind hacking my
own solution for my app, but I'd prefer a global solution.)

--
__________________________________________________________________________
"The best assumption to have
Mark J. Lilback is that any commonly held
<mark AT lilback.com> belief is wrong." -- Ken Olsen,
http://www.lilback.com/ founder, Digital Equip. Corp.




Archive powered by MHonArc 2.6.24.

Top of Page