freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Steve Langasek <vorlon AT netexpress.net>
- To: TDS Development Group <freetds AT franklin.oit.unc.edu>
- Subject: Re: [PATCH] msg_number to TDS_UINT
- Date: Sat, 26 Jan 2002 11:43:51 -0600
On Sat, Jan 26, 2002 at 10:10:42AM -0000, Dave Brotherstone wrote:
> As discussed, a diff (I hope it's the right format - shout if it's not) of
> the couple of changes to make the msg_number a TDS_UINT under dblib.
> Tested with SQL2000 and PHP/Apache.
My concern is that this is being done specifically *because* of the line
in dblib/dbutil.c:
if( tds->msg_info->msg_number > 0 )
If you change msg_number to be a uint, then this comparison will always
be false. But either this comparison was put here for a good reason, in
which case making the variable a uint is wrong; or it wasn't, in which
case the comparison should simply be eliminated.
If it's just a question of the storage size being too small, then it
should be changed to a TDS_INT, not a TDS_UINT.
Steve Langasek
postmodern programmer
> Index: include/tds.h.in
> ===================================================================
> RCS file: /cvsroot/freetds/freetds/include/tds.h.in,v
> retrieving revision 1.9
> diff -u -r1.9 tds.h.in
> --- include/tds.h.in 2001/12/03 00:06:14 1.9
> +++ include/tds.h.in 2002/01/26 09:58:01
> @@ -476,7 +476,7 @@
> typedef struct tds_msg_info {
> TDS_SMALLINT priv_msg_type;
> TDS_SMALLINT line_number;
> - TDS_SMALLINT msg_number;
> + TDS_UINT msg_number;
> TDS_SMALLINT msg_state;
> TDS_SMALLINT msg_level;
> TDS_CHAR *server;
> Index: src/dblib/dbutil.c
> ===================================================================
> RCS file: /cvsroot/freetds/freetds/src/dblib/dbutil.c,v
> retrieving revision 1.5
> diff -u -r1.5 dbutil.c
> --- src/dblib/dbutil.c 2001/11/14 04:52:33 1.5
> +++ src/dblib/dbutil.c 2002/01/26 09:58:01
> @@ -29,7 +29,7 @@
>
>
> extern int
> (*g_dblib_msg_handler)(DBPROCESS*,TDS_SMALLINT,TDS_SMALLINT,TDS_SMALLINT,TDS_CHAR*,TDS_CHAR*,TDS_CHAR*);
> -extern int
> (*g_dblib_err_handler)(DBPROCESS*,TDS_SMALLINT,TDS_SMALLINT,TDS_SMALLINT,TDS_CHAR*,TDS_CHAR*);
> +extern int
> (*g_dblib_err_handler)(DBPROCESS*,TDS_SMALLINT,TDS_UINT,TDS_SMALLINT,TDS_CHAR*,TDS_CHAR*);
>
> /* The next 2 functions will be the reciever for the info and error
> messages
> * that come from the TDS layer. The address of this function is passed to
>
>
Content-Description: footer
> ---
> You are currently subscribed to freetds as: [vorlon AT netexpress.net]
> To unsubscribe, forward this message to
> leave-freetds-118790I AT franklin.oit.unc.edu
Attachment:
pgpAitQTCecsU.pgp
Description: PGP signature
-
[PATCH] msg_number to TDS_UINT,
Dave Brotherstone, 01/26/2002
- <Possible follow-up(s)>
- Re: [PATCH] msg_number to TDS_UINT, Steve Langasek, 01/26/2002
- Re: [PATCH] msg_number to TDS_UINT, Chris Eleveld, 01/26/2002
- Re: [PATCH] msg_number to TDS_UINT, Bob Kline, 01/26/2002
- Re: [PATCH] msg_number to TDS_UINT, Steve Langasek, 01/26/2002
- Re: [PATCH] msg_number to TDS_UINT, Dave Brotherstone, 01/26/2002
Archive powered by MHonArc 2.6.24.