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

(-)a/src/core/model/config.cc (-2 / +14 lines)
 Lines 105-115    Link Here 
105
{
105
{
106
  NS_LOG_FUNCTION (this << name << &cb);
106
  NS_LOG_FUNCTION (this << name << &cb);
107
  NS_ASSERT (m_objects.size () == m_contexts.size ());
107
  NS_ASSERT (m_objects.size () == m_contexts.size ());
108
  bool found = false;
108
  for (uint32_t i = 0; i < m_objects.size (); ++i)
109
  for (uint32_t i = 0; i < m_objects.size (); ++i)
109
    {
110
    {
110
      Ptr<Object> object = m_objects[i];
111
      Ptr<Object> object = m_objects[i];
111
      std::string ctx = m_contexts[i] + name;
112
      std::string ctx = m_contexts[i] + name;
112
      object->TraceConnect (name, ctx, cb);
113
      found |= object->TraceConnect (name, ctx, cb);
114
    }
115
  if (!found)
116
    {
117
      NS_LOG_UNCOND ("No trace found for " << name);
113
    }
118
    }
114
}
119
}
115
void 
120
void 
 Lines 117-126    Link Here 
117
{
122
{
118
  NS_LOG_FUNCTION (this << name << &cb);
123
  NS_LOG_FUNCTION (this << name << &cb);
119
124
125
  bool found = false;
120
  for (Iterator tmp = Begin (); tmp != End (); ++tmp)
126
  for (Iterator tmp = Begin (); tmp != End (); ++tmp)
121
    {
127
    {
122
      Ptr<Object> object = *tmp;
128
      Ptr<Object> object = *tmp;
123
      object->TraceConnectWithoutContext (name, cb);
129
      found |= object->TraceConnectWithoutContext (name, cb);
130
    }
131
  if (!found)
132
    {
133
      NS_LOG_UNCOND ("No trace found for " << name);
124
    }
134
    }
125
}
135
}
126
void 
136
void 
 Lines 801-806    Link Here 
801
  bool ok = TypeId::LookupByNameFailSafe (tidName, &tid);
811
  bool ok = TypeId::LookupByNameFailSafe (tidName, &tid);
802
  if (!ok)
812
  if (!ok)
803
    {
813
    {
814
      NS_LOG_UNCOND ("No attribute named \"" << fullName << "\" found");
804
      return false;
815
      return false;
805
    }
816
    }
806
  for (uint32_t j = 0; j < tid.GetAttributeN (); j++)
817
  for (uint32_t j = 0; j < tid.GetAttributeN (); j++)
 Lines 817-822    Link Here 
817
          return true;
828
          return true;
818
        }
829
        }
819
    }
830
    }
831
  NS_LOG_UNCOND ("Attribute named \"" << fullName << "\" could not be set (invalid value?)");
820
  return false;
832
  return false;
821
}
833
}
822
void SetGlobal (std::string name, const AttributeValue &value)
834
void SetGlobal (std::string name, const AttributeValue &value)

Return to bug 2815