subscribeToProperty being called on the source now
authorKevron Rees <tripzero.kev@gmail.com>
Tue, 28 Aug 2012 14:15:21 +0000 (07:15 -0700)
committerKevron Rees <tripzero.kev@gmail.com>
Tue, 28 Aug 2012 14:15:21 +0000 (07:15 -0700)
ambd/core.cpp

index d30f6f4..34ed1af 100644 (file)
@@ -170,6 +170,15 @@ void Core::subscribeToProperty(VehicleProperty::Property property, AbstractSink*
                propertySinkMap[property].push_back(self);
        }
        
+       for(SourceList::iterator itr = mSources.begin(); itr != mSources.end(); itr++)
+       {
+               AbstractSource* src = (*itr);
+               PropertyList properties = src->supported();
+               if(ListPlusPlus<VehicleProperty::Property>(&properties).contains(property))
+               {
+                       src->subscribeToPropertyChanges(property);
+               }
+       }
 }
 
 void Core::unsubscribeToProperty(VehicleProperty::Property property, AbstractSink* self)