From 34b8e3917260df4cd6a49edd6828d470e6a46960 Mon Sep 17 00:00:00 2001 From: F5 Date: Wed, 19 Oct 2022 21:18:44 +0800 Subject: [PATCH] core: Make aggregated objects thread-safe --- src/core/model/object.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/model/object.cc b/src/core/model/object.cc index a99476066..03e701d9d 100644 --- a/src/core/model/object.cc +++ b/src/core/model/object.cc @@ -163,6 +163,7 @@ Object::DoGetObject (TypeId tid) const } if (cur == tid) { +#ifndef NS3_MTP // This is an attempt to 'cache' the result of this lookup. // the idea is that if we perform a lookup for a TypeId on this object, // we are likely to perform the same lookup later so, we make sure @@ -173,6 +174,7 @@ Object::DoGetObject (TypeId tid) const current->m_getObjectCount++; // then, update the sort UpdateSortedArray (m_aggregates, i); +#endif // finally, return the match return const_cast (current); }