[Ns-bugs] [Bug 311] New: Tcp socket close returns -1 but does not set errno.

bugzilla-daemon@nsnam-www.ece.gatech.edu bugzilla-daemon at nsnam-www.ece.gatech.edu
Thu Sep 4 13:08:12 PDT 2008


http://www.nsnam.org/bugzilla/show_bug.cgi?id=311

           Summary: Tcp socket close returns -1 but does not set errno.
           Product: ns-3
           Version: pre-release
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P3
         Component: internet-stack
        AssignedTo: ns-bugs at isi.edu
        ReportedBy: mathieu.lacage at sophia.inria.fr


tcp-socket-impl.cc: line 294:

  if (m_state == CLOSED)
    {
      return -1;
    }

It is illegal to return -1 without setting errno. But I have to confess that I
don't really understand the purpose of this check: is it expected to guard
against a double close ? If so, I suspect that the return errno here is EBADF.


-- 
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the Ns-bugs mailing list