apply patch for bug 390 (SocketImpl::Bind returns something other than -1)
authorraj.b@gatech.edu
Wed Nov 05 19:53:52 2008 -0800 (15 months ago)
changeset 3846265004d6dc15
parent 3845 e45be3d9181b
child 3847 784c45b27326
child 3848 affd0834debc
apply patch for bug 390 (SocketImpl::Bind returns something other than -1)
src/internet-stack/tcp-socket-impl.cc
src/internet-stack/udp-socket-impl.cc
     1.1 --- a/src/internet-stack/tcp-socket-impl.cc	Wed Nov 05 19:45:40 2008 -0800
     1.2 +++ b/src/internet-stack/tcp-socket-impl.cc	Wed Nov 05 19:53:52 2008 -0800
     1.3 @@ -250,7 +250,8 @@
     1.4    NS_LOG_FUNCTION (this<<address);
     1.5    if (!InetSocketAddress::IsMatchingType (address))
     1.6      {
     1.7 -      return ERROR_INVAL;
     1.8 +      m_errno = ERROR_INVAL;
     1.9 +      return -1;
    1.10      }
    1.11    InetSocketAddress transport = InetSocketAddress::ConvertFrom (address);
    1.12    Ipv4Address ipv4 = transport.GetIpv4 ();
     2.1 --- a/src/internet-stack/udp-socket-impl.cc	Wed Nov 05 19:45:40 2008 -0800
     2.2 +++ b/src/internet-stack/udp-socket-impl.cc	Wed Nov 05 19:53:52 2008 -0800
     2.3 @@ -157,7 +157,8 @@
     2.4    if (!InetSocketAddress::IsMatchingType (address))
     2.5      {
     2.6        NS_LOG_ERROR ("Not IsMatchingType");
     2.7 -      return ERROR_INVAL;
     2.8 +      m_errno = ERROR_INVAL;
     2.9 +      return -1;
    2.10      }
    2.11    InetSocketAddress transport = InetSocketAddress::ConvertFrom (address);
    2.12    Ipv4Address ipv4 = transport.GetIpv4 ();