freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Steven J. Backus" <backus AT math.utah.edu>
- To: "TDS Development Group" <freetds AT franklin.metalab.unc.edu>
- Subject: Re: dberrhandler() and dbmsghandler()
- Date: Fri, 6 Sep 2002 10:59:33 -0600 (MDT)
> In src/dblib/dblib.c we have definitions of dberrhandler() and
> dbmsghandler()...
This reminds me of another problem I have with freetds. Here's the
msg_handler I use:
int msg_handler(DBPROCESS *dbproc, DBINT msgno, int msgstate,
int severity, char *msgtext, char *srvname, char *procname,
int line)
{
fprintf (ERR_CH, "Msg %ld, Level %d, State %d\n",
msgno, severity, msgstate);
if (strlen(srvname) > 0)
fprintf (ERR_CH, "Server '%s', ", srvname);
if (strlen(procname) > 0)
fprintf (ERR_CH, "Procedure '%s', ", procname);
if (line > 0)
fprintf (ERR_CH, "Line %d", line);
fprintf (ERR_CH, "\n\t%s\n", msgtext);
return(0);
--
This puppy crashes under freetds, but not with sybase's tds. It
happens like this:
dbmsghandle(msg_handler); /* install msg_handler */
dbuse(dbproc, "db"); /* Crash occurs at this line */
I've bt'd in gdb and the line that's blowing up is:
if (strlen(srvname) > 0)
fprintf (ERR_CH, "Server '%s', ", srvname);
The strlen is core dumping because srvname isn't initialized. Any
chance of getting this fixed? I forget to comment out this line
until a user calls me complaining.
Thanks,
Steve
-
dberrhandler() and dbmsghandler(),
Castellano, Nicholas, 09/06/2002
- <Possible follow-up(s)>
- Re: dberrhandler() and dbmsghandler(), Steven J. Backus, 09/06/2002
- RE: dberrhandler() and dbmsghandler(), Lowden, James K, 09/06/2002
- Re: dberrhandler() and dbmsghandler(), Lowden, James K, 09/06/2002
- Re: dberrhandler() and dbmsghandler(), Frediano Ziglio, 09/06/2002
- Re: dberrhandler() and dbmsghandler(), Steven J. Backus, 09/06/2002
- Re: dberrhandler() and dbmsghandler(), Frediano Ziglio, 09/06/2002
- Re: dberrhandler() and dbmsghandler(), Steven J. Backus, 09/06/2002
- Re: dberrhandler() and dbmsghandler(), Steven J. Backus, 09/06/2002
- RE: dberrhandler() and dbmsghandler(), Castellano, Nicholas, 09/06/2002
- Re: dberrhandler() and dbmsghandler(), Lowden, James K, 09/06/2002
- Re: dberrhandler() and dbmsghandler(), Castellano, Nicholas, 09/06/2002
Archive powered by MHonArc 2.6.24.