[freetds] FreeTDS 0.82 on Microsoft SUA/Interix
Chandana De Silva
cdesilva at aconex.com
Thu Aug 20 15:46:47 EDT 2009
Thank you to those who replied.
After some more digging, the problem was found.
The problem is in src/tds/net.c - in the tds_select function.
For some reason the configure script was setting USE_POLL on, and it was using the poll function rather than select. Changed USE_POLL to off and it now works fin
Hope somebody who knows more than me can sort out the problem with configure..
Thanks
Chandana
<snip>
timeval pointer to select(2).
*/
poll_seconds = (tds->tds_ctx && tds->tds_ctx->int_handler)? 1 : timeout_seconds;
for (seconds = timeout_seconds; timeout_seconds == 0 || seconds > 0; seconds -= poll_seconds) {
#if USE_POLL
struct pollfd fd;
int timeout = poll_seconds ? poll_seconds * 1000 : -1;
fd.fd = tds->s;
fd.events = tds_sel;
fd.revents = 0;
rc = poll(&fd, 1, timeout);
#else
struct timeval tv, *ptv = poll_seconds? &tv : NULL;
tv.tv_sec = poll_seconds;
tv.tv_usec = 0;
if (readfds)
FD_SET(tds->s, readfds);
if (writefds)
FD_SET(tds->s, writefds);
if (exceptfds)
FD_SET(tds->s, exceptfds);
rc = select(tds->s + 1, readfds, writefds, exceptfds, ptv);
#endif
More information about the FreeTDS
mailing list