CVS: rdesktop rdpdr.c,1.29,1.30
Peter ?strand <[email protected]>
| Newsgroups | gmane.network.rdesktop.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/rdesktop/rdesktop
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7158
Modified Files:
rdpdr.c
Log Message:
Make sure iorq->fd is a valid FD before adding it to the FD_SET.
Prevents endless loops with "select: Bad file descriptor" error
messages.
Index: rdpdr.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/rdpdr.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** rdpdr.c 16 Apr 2004 12:20:56 -0000 1.29
--- rdpdr.c 16 Apr 2004 14:04:02 -0000 1.30
***************
*** 810,818 ****
uint32 select_timeout = 0; // Timeout value to be used for select() (in millisecons).
struct async_iorequest *iorq;
iorq = g_iorequest;
while (iorq != NULL)
{
! if (iorq->fd != 0)
{
switch (iorq->major)
--- 810,820 ----
uint32 select_timeout = 0; // Timeout value to be used for select() (in millisecons).
struct async_iorequest *iorq;
+ char c;
iorq = g_iorequest;
while (iorq != NULL)
{
! /* We need to test that the fd is still valid */
! if ((iorq->fd != 0) && (read(iorq->fd, &c, 0) == 0))
{
switch (iorq->major)
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click