summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2013-05-05 20:07:02 +0000
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2013-05-05 20:07:02 +0000
commit5d953d346a261f689935f92bdda9d5c267eea4e5 (patch)
treed713717f189d05fa951aefb27e820ca1d6107a60
parentc1791fcd225971ae08492b319322be2ac81fac89 (diff)
downloadnavit-5d953d346a261f689935f92bdda9d5c267eea4e5.tar.gz
Fix:Core:Count all paths for destination time/length
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@5487 ffa7fe5e-494d-0410-b361-a75ebd5db220
-rw-r--r--navit/navit/route.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/navit/navit/route.c b/navit/navit/route.c
index 63bb3f2a0..8c4fcb145 100644
--- a/navit/navit/route.c
+++ b/navit/navit/route.c
@@ -3881,17 +3881,25 @@ route_get_attr(struct route *this_, enum attr_type type, struct attr *attr, stru
break;
case attr_destination_time:
if (this_->path2 && (this_->route_status == route_status_path_done_new || this_->route_status == route_status_path_done_incremental)) {
-
- attr->u.num=this_->path2->path_time;
+ struct route_path *path=this_->path2;
+ attr->u.num=0;
+ while (path) {
+ attr->u.num+=path->path_time;
+ path=path->next;
+ }
dbg(1,"path_time %d\n",attr->u.num);
- }
- else
+ } else
ret=0;
break;
case attr_destination_length:
- if (this_->path2 && (this_->route_status == route_status_path_done_new || this_->route_status == route_status_path_done_incremental))
- attr->u.num=this_->path2->path_len;
- else
+ if (this_->path2 && (this_->route_status == route_status_path_done_new || this_->route_status == route_status_path_done_incremental)) {
+ struct route_path *path=this_->path2;
+ attr->u.num=0;
+ while (path) {
+ attr->u.num+=path->path_len;
+ path=path->next;
+ }
+ } else
ret=0;
break;
default: