Skip to Content.
Sympa Menu

freetds - [freetds] no const static...

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddyz77 AT tin.it>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: [freetds] no const static...
  • Date: Thu, 22 Sep 2005 15:17:41 +0200

In src/dblib/dblib.c

int
dbperror (DBPROCESS *dbproc, DBINT msgno, int errnum)
{
static int microsoft_timeouts = 0;
...
switch (rc) { case INT_CONTINUE:
/* Microsoft does not define INT_TIMEOUT. Instead, two
consecutive INT_CONTINUEs yield INT_CANCEL. */
if (dbproc && dbproc->msdblib && ++microsoft_timeouts
>=2) {
microsoft_timeouts = 0;
rc = INT_CANCEL;
} /* fall through */
case INT_CANCEL:
case INT_TIMEOUT:
...

In this case static means:
- not reentrant
- possible strange behavior for multiple connection

I would move microsoft_timeouts in dbproc

freddy77






Archive powered by MHonArc 2.6.24.

Top of Page