Bug 962 - list of paths to reach objects contains bogus entries

This commit is contained in:
Mitch Watrous
2012-05-01 10:18:37 -07:00
parent 9805521e71
commit 1b9b93d819
6 changed files with 29 additions and 0 deletions

View File

@@ -36,6 +36,7 @@ New user-visible features
Bugs fixed
----------
- bug 962 - list of paths to reach objects contains bogus entries
- bug 1313 - Stddev (average.h) returning NaN
- bug 1319 - Fix Ipv6RawSocketImpl Icmpv6 filter
- bug 1318 - Asserts for IPv6 malformed packets

View File

@@ -34,6 +34,8 @@ namespace ns3
NS_LOG_COMPONENT_DEFINE ("Ipv6Interface");
NS_OBJECT_ENSURE_REGISTERED (Ipv6Interface);
TypeId Ipv6Interface::GetTypeId ()
{
static TypeId tid = TypeId ("ns3::Ipv6Interface")

View File

@@ -42,6 +42,8 @@ NS_LOG_COMPONENT_DEFINE ("UdpSocketImpl");
namespace ns3 {
NS_OBJECT_ENSURE_REGISTERED (UdpSocketImpl);
static const uint32_t MAX_IPV4_UDP_DATAGRAM_SIZE = 65507;
// Add attributes generic to all UdpSockets to base class UdpSocket

View File

@@ -31,6 +31,16 @@ NS_LOG_COMPONENT_DEFINE ("Socket");
namespace ns3 {
NS_OBJECT_ENSURE_REGISTERED (Socket);
TypeId
Socket::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::Socket")
.SetParent<Object> ();
return tid;
}
Socket::Socket (void)
{
m_boundnetdevice = 0;

View File

@@ -64,6 +64,7 @@ class Packet;
class Socket : public Object
{
public:
static TypeId GetTypeId (void);
Socket (void);
virtual ~Socket (void);

View File

@@ -207,6 +207,19 @@ StaticInformation::DoGather (TypeId tid)
if (ptrChecker != 0)
{
TypeId pointee = ptrChecker->GetPointeeTypeId ();
// See if this is a pointer to an Object.
Ptr<Object> object = CreateObject<Object> ();
TypeId objectTypeId = object->GetTypeId ();
if (objectTypeId == pointee)
{
// Stop the recursion at this attribute if it is a
// pointer to an Object, which create too many spurious
// paths in the list of attribute paths because any
// Object can be in that part of the path.
continue;
}
m_currentPath.push_back (info.name);
m_alreadyProcessed.push_back (tid);
DoGather (pointee);