Skip to Content.
Sympa Menu

freetds - Re: WARNING: Changing tds_connect() API

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: WARNING: Changing tds_connect() API
  • Date: Wed, 11 Sep 2002 21:52:46 -0400 (EDT)



I dislike the ** approach. I think a preferrable solution is to split
tds_connect into top and bottom halves with the top half doing the
allocation and config handling. (The unconnected half).

The API could then call tds_set_parent() itself instead of passing the
void parent pointer into tds_connect().

Then the bottom half would do the connect, login packet, and login ack
processing.

Nice and clean (hopefully), and tds_connect() is getting a bit long in the
tooth anyway.

Brian

On Wed, 11 Sep 2002, Castellano, Nicholas wrote:

> I will be changing the API for tds_connect(). Currently, this function
> returns the TDSSOCKET * to its caller. However, in dblib we need this
> information in the dbproc before tds_connect() returns. When error or
> message handlers are invoked during login, the dbproc currently appears to
> be DBDEAD() since the socket is not set up. In the new scheme, tds_connect
> will take a TDSSOCKET ** parameter, and will fill in the new TDSSOCKET **
> when it has been connected to the database server.
>
>
> So instead of:
>
> dbproc->tds_socket = (void *) tds_connect(login->tds_login,
> g_dblib_ctx->tds_ctx, (void *)dbproc);
>
> We will now have:
>
> tds_connect(&(dbproc->tds_socket), login->tds_login, g_dblib_ctx->tds_ctx,
> (void *)dbproc);
>
> Of course all the other calls throughout the tree will be updated as well,
> to use the new API.
>
> I intend to commit this early tomorrow (along with a while bunch of other
> error/message handler fixes), unless there are any serious objections.
>
> Cheers,
> --nick
>
>
>
> The information contained in this transmission may contain privileged and
> confidential information and is intended only for the use of the person(s)
> named above. If you are not the intended recipient, or an employee or agent
> responsible for delivering this message to the intended recipient, any
> review, dissemination, distribution or duplication of this communication is
> strictly prohibited. If you are not the intended recipient, please contact
> the sender immediately by reply e-mail and destroy all copies of the
> original message. Please note that for certain accounts we do not accept
> orders and/or instructions by e-mail, and for those accounts we will not be
> responsible for carrying out such orders and/or instructions. Kindly refrain
> from sending orders or instructions by e-mail unless you have confirmed that
> we accept such communications for your account. Please also note that to
> satisfy regulatory requirements we review the outgoing and incoming e-mail
> correspondence of staff members serving certain functions.
>
>
>
> ---
> You are currently subscribed to freetds as: [camber AT ais.org]
> To unsubscribe, forward this message to $subst('Email.Unsub')
>
>







Archive powered by MHonArc 2.6.24.

Top of Page