Skip to Content.
Sympa Menu

freetds - Re: error handling mire

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Brian Bruns <camber AT ais.org>
  • To: TDS Development Group <freetds AT franklin.metalab.unc.edu>
  • Subject: Re: error handling mire
  • Date: Sat, 24 Aug 2002 20:39:57 -0400 (EDT)


On Sat, 24 Aug 2002, James K. Lowden wrote:

> As I understand it, TDSSOCKET::tds_ctx should point to a TDSCONTEXT, so if
> you pass a TDSSOCKET, you don't have to pass its TDSCONTEXT.
>
> I know, dbconvert() may be called with a NULL DBPROCESS*, and hence won't
> have a socket or a context, and a context is really handy to
> tds_client_msg(), because among other things it has a pointer to the
> user-defined error message handler. What dbconvert will have to do is
> make stuff up. It will have to construct a faux TDSSOCKET, gather the
> default TDSCONTEXT from global template created in dbinit(), and call
> tds_convert() with that.

Just a pendantic point, TDSSOCKET * passed to tds_client_msg can be NULL,
so there is no need to dummy up anything. The subconverters can similarly
take a TDSCONTEXT * instead of TDSSOCKET. This is consistant with how
OpenClient operates.

Brian





Archive powered by MHonArc 2.6.24.

Top of Page