[freetds] no const static...

Frediano Ziglio freddyz77 at tin.it
Thu Sep 22 09:17:41 EDT 2005


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





More information about the FreeTDS mailing list