Skip to Content.
Sympa Menu

freetds - [freetds] Re: \connect: Unable to install message callback

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Steve Langasek <vorlon AT netexpress.net>
  • To: freetds AT lists.ibiblio.org
  • Subject: [freetds] Re: \connect: Unable to install message callback
  • Date: Sat, 11 Jan 2003 20:03:15 -0600

On Sat, Jan 11, 2003 at 06:59:11PM -0600, Steve Langasek wrote:

> The regression dates back to September 26, 2002, for the record.

> In the meantime, I'll see about getting setlocale() support into tsql.

... ok, I lied; instead, I'm tracking down the incompatibility. :)

Looks like the following change to the definition of a public structure
is the problem:

-typedef struct cs_context
+struct cs_context
{
CS_INT date_convert_fmt;
- int (*_clientmsg_cb)(void*, void*, void*);
- int (*_servermsg_cb)(void*, void*, void*);
+ CS_RETCODE (*_cslibmsg_cb)(CS_CONTEXT *, CS_CLIENTMSG *);
+ CS_RETCODE (*_clientmsg_cb)(CS_CONTEXT *, CS_CONNECTION *,
CS_CLIENTMSG *);
+ CS_RETCODE (*_servermsg_cb)(CS_CONTEXT *, CS_CONNECTION *,
CS_SERVERMSG *);
TDSCONTEXT *tds_ctx;
-} CS_CONTEXT;
+};

This breaks applications compiled against previous versions of ctlib,
because ctlib and the application have different ideas of the offset
into the structure for the _clientmsg_cb, _servermsg_cb, and tds_ctx
elements.

Is it ok to move the newly-added _cslibmsg_cb element to the end of the
structure (preserving binary compatibility), or is it time to bump the
SONAME of libct.so?

--
Steve Langasek
postmodern programmer

Attachment: pgpZCevSPM9Jl.pgp
Description: PGP signature




Archive powered by MHonArc 2.6.24.

Top of Page