boost::mutex::scoped_lock lock(m_AttributeMutex);
if ((allowedTypes & Attribute_Config) != 0 && !configTxValue.IsEmpty()) {
- double oldConfigTx, configTx = configTxValue;
+ double configTx = configTxValue;
if (configTx > m_ConfigTx) {
DynamicObject::AttributeIterator at;
*/
void DynamicObject::Touch(const String& name)
{
- assert(!OwnsLock());
+ assert(OwnsLock());
boost::mutex::scoped_lock lock(m_AttributeMutex);
m_ConfigTx = tx;
}
- if (m_Registered) {
+ if (IsRegistered()) {
/* We can't call GetSelf() in the constructor or destructor.
* The Register() function will take care of adding this
* object to the list of modified objects later on if we can't
*/
bool DynamicObject::IsRegistered(void) const
{
+ ObjectLock olock(GetType());
return m_Registered;
}
{
assert(!OwnsLock());
- {
- ObjectLock olock(this);
- m_Registered = true;
- }
-
Start();
OnRegistered(GetSelf());
{
assert(!OwnsLock());
- {
- ObjectLock olock(this);
- m_Registered = false;
- }
-
OnUnregistered(GetSelf());
}