summaryrefslogtreecommitdiff
path: root/navit/route.c
diff options
context:
space:
mode:
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2013-03-11 22:07:25 +0000
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2013-03-11 22:07:25 +0000
commitce6773e3f270da67e7fbc44ff4f8da101f282f7c (patch)
tree38eca646886250be94d5e703236bb263b7fc3773 /navit/route.c
parentd366fa5a32d9ab1883d846c8d207b91a0f085601 (diff)
downloadnavit-ce6773e3f270da67e7fbc44ff4f8da101f282f7c.tar.gz
Fix:Core:Consider route_depth of profile options
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5412 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/route.c')
-rw-r--r--navit/route.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/navit/route.c b/navit/route.c
index 9e1ae96cf..6513d5086 100644
--- a/navit/route.c
+++ b/navit/route.c
@@ -970,8 +970,7 @@ route_calc_selection(struct coord *c, int count, struct vehicleprofile *profile)
struct map_selection *ret=NULL;
int i;
struct coord_rect r;
- char *str, *tok;
- struct attr attr;
+ char *depth, *str, *tok;
if (!count)
return NULL;
@@ -980,11 +979,10 @@ route_calc_selection(struct coord *c, int count, struct vehicleprofile *profile)
for (i = 1 ; i < count ; i++)
coord_rect_extend(&r, &c[i]);
- if(!vehicleprofile_get_attr(profile,attr_route_depth, &attr, NULL) || attr.u.str==NULL) {
- attr.u.str="4:25%,8:40000,18:10000";
- }
-
- attr.u.str=str=g_strdup(attr.u.str);
+ depth=profile->route_depth;
+ if (!depth)
+ depth="4:25%,8:40000,18:10000";
+ depth=str=g_strdup(depth);
while((tok=strtok(str,","))!=NULL) {
int order=0, dist=0;
@@ -998,7 +996,7 @@ route_calc_selection(struct coord *c, int count, struct vehicleprofile *profile)
str=NULL;
}
- g_free(attr.u.str);
+ g_free(depth);
return ret;
}