View | Details | Raw Unified | Return to bug 810
Collapse All | Expand All

(-)a/src/internet-stack/tcp-socket-impl.cc (-2 / +11 lines)
 Lines 630-637    Link Here 
630
TcpSocketImpl::GetSockName (Address &address) const
630
TcpSocketImpl::GetSockName (Address &address) const
631
{
631
{
632
  NS_LOG_FUNCTION_NOARGS ();
632
  NS_LOG_FUNCTION_NOARGS ();
633
  address = InetSocketAddress(m_endPoint->GetLocalAddress (), 
633
  if (m_endPoint != 0)
634
                              m_endPoint->GetLocalPort ());
634
    {
635
      address = InetSocketAddress (m_endPoint->GetLocalAddress (), 
636
                                   m_endPoint->GetLocalPort ());
637
    } 
638
  else
639
    {
640
      // It is possible to call this method on a socket without a name
641
      // in which case, behavior is unspecified
642
      address = InetSocketAddress (Ipv4Address::GetZero (), 0);
643
    }
635
  return 0;
644
  return 0;
636
}
645
}
637
646
(-)a/src/internet-stack/udp-socket-impl.cc (+2 lines)
 Lines 531-536    Link Here 
531
    }
531
    }
532
  else
532
  else
533
    {
533
    {
534
      // It is possible to call this method on a socket without a name
535
      // in which case, behavior is unspecified
534
      address = InetSocketAddress(Ipv4Address::GetZero(), 0);
536
      address = InetSocketAddress(Ipv4Address::GetZero(), 0);
535
    }
537
    }
536
  return 0;
538
  return 0;

Return to bug 810