www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 5400] New: Socket.select / FD_ISSET broken on phobos/D2

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5400

           Summary: Socket.select / FD_ISSET broken on phobos/D2
           Product: D
           Version: D2
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: druntime
        AssignedTo: sean invisibleduck.org
        ReportedBy: eric.estievenart free.fr



05:51:46 PST ---
Since druntime/import/core/sys/posix/sys/select.di defines wrongly FD_ISSET as:
extern (D) bool FD_ISSET(int fd, fd_set* fdset)
{
return (fdset.fds_bits[__FDELT(fd)] & __FDMASK(fd)) == 0;
}

instead of
return (fdset.fds_bits[__FDELT(fd)] & __FDMASK(fd)) != 0;

=> Socket.select does not work at all.

BTW, should be const:
bool FD_ISSET(int fd, const(fd_set)* fdset)
so constness could be propagated on SocketSet...

BTW (bis) select() should be in a separate module...

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 02 2011
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5400


Brad Roberts <braddr puremagic.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |braddr puremagic.com
         Resolution|                            |FIXED
            Summary|Socket.select / FD_ISSET    |Add const to FD_ISSET
                   |broken on phobos/D2         |



---
The ISSET bug was addressed in bug 5209 which has already been fixed for the
next release.

I went ahead and added the const-ness to the isset set parameter.  druntime
r471

--

For the rest, you'll need to provide more details.  Since this report seems to
be two different parts, I'm going to mark it resolved due to the first part. 
Please re-file the second half as a separate report with enough specificity to
allow someone to reproduce the problem.  IE, include code that compiles and
shows the bug.

Thanks,
Brad

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 02 2011