summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--navit/vehicle.c4
-rw-r--r--navit/vehicle/demo/vehicle_demo.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/navit/vehicle.c b/navit/vehicle.c
index 31907b8ec..331042d9a 100644
--- a/navit/vehicle.c
+++ b/navit/vehicle.c
@@ -247,6 +247,10 @@ vehicle_set_attr(struct vehicle *this_, struct attr *attr)
int ret=1;
if (this_->meth.set_attr)
ret=this_->meth.set_attr(this_->priv, attr);
+ /* attr_profilename probably is never used by vehicle itself but it's used to control the
+ routing engine. So any vehicle should allow to set and read it. */
+ if(attr->type == attr_profilename)
+ ret=1;
if (ret == 1 && attr->type == attr_log_gpx_desc) {
g_free(this_->gpx_desc);
this_->gpx_desc = attr->u.str;
diff --git a/navit/vehicle/demo/vehicle_demo.c b/navit/vehicle/demo/vehicle_demo.c
index 5c2f234b1..e37a04933 100644
--- a/navit/vehicle/demo/vehicle_demo.c
+++ b/navit/vehicle/demo/vehicle_demo.c
@@ -110,6 +110,7 @@ vehicle_demo_set_attr_do(struct vehicle_priv *priv, struct attr *attr)
priv->position_set=1;
dbg(1,"position_set %f %f\n", priv->geo.lat, priv->geo.lng);
break;
+ case attr_profilename:
case attr_source:
// Ignore; is always present, but not read by this vehicle.
break;