nanogui: bug in GrRegisterInput
Subject:
bug in GrRegisterInput
From:
Chen sheng ####@####.####
Date:
12 Jul 2002 04:12:45 -0000
Message-Id: <20020712040008.54866.qmail@web9902.mail.yahoo.com>
Hi,
I am using microwindows-0.89pre8. GrRegisterInput cannot register
successive file descriptors.
Test code:
GrRegisterInput(4); /* now regfdmax is 5 */
GrRegisterInput(5); /* now regfdmax is still 5 */
Below is the original function:
void
GrRegisterInput(int fd)
{
ACCESS_PER_THREAD_DATA()
if (fd < 0)
return;
FD_SET(fd, ®fdset);
if (fd > regfdmax) regfdmax = fd + 1; /* ----- */
}
Patch:
if (fd >= regfdmax) regfdmax = fd + 1; /* +++++ */
__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com