}
master->onSignalReceived(objectName,master->objectToPropertyValuesMap[objectName]);
-
+
+ g_variant_unref(parameters);
+
if(valueArray != NULL)
g_variant_unref(valueArray);
- //g_free(valueArray);
+
+ g_variant_unref(ifaceName);
}
std::map<std::string, GVariant*> VehicleMaster::get(std::string property)
if(error)
{
LoggerD("failed to call GetAll on interface " << interfaceName);
+ g_object_unref(propertiesProxy);
+ g_error_free(error);
return returnValue;
}
returnValue[key] = value;
}
+ g_object_unref(propertiesProxy);
return returnValue;
}
GVariant* propertyMap = g_dbus_proxy_call_sync(propertiesProxy, "GetAll", g_variant_new("(s)", interfaceName.c_str()), G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
+ g_object_unref(propertiesProxy);
+
if(error)
{
LoggerD("failed to call GetAll on interface " << interfaceName<< " "<<error->message);
GVariant* objectPath = g_dbus_proxy_call_sync(managerProxy, "findProperty", g_variant_new("(s)", objectName.c_str()), G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
- if(!objectPath)
- {
- LoggerD("Could not find property");
- return "";
- }
-
if(error)
{
LoggerD("error calling findProperty "<< error->message);
return "";
}
+ if(!objectPath)
+ {
+ LoggerD("Could not find property");
+ return "";
+ }
+
LoggerD("returned object path: " << g_variant_get_type_string(objectPath));
gchar * objP;
LoggerD("findProperty() returned object path: " <<objP);
- g_variant_unref(objectPath);
+ g_variant_unref(objectPath);
return objP;
-
}
void VehicleMaster::onSignalReceived(std::string objectName, std::map<std::string, GVariant*> propertyMap)