@@ -1299,6 +1299,7 @@ void route_remove_waypoint(struct route *this) {
12991299 route_path_destroy (path , 0 );
13001300 if (!this -> destinations ) {
13011301 this -> route_status = route_status_no_destination ;
1302+ dbg (lvl_debug , "route_status set to: %i" , this -> route_status );
13021303 this -> reached_destinations_count = 0 ;
13031304 return ;
13041305 }
@@ -2708,16 +2709,11 @@ void route_recalculate_partial(struct route *this_) {
27082709 return ;
27092710
27102711 route_status .type = attr_route_status ;
2711-
27122712 route_status .u .num = route_status_building_graph ;
27132713 route_set_attr (this_ , & route_status );
2714-
2715- printf ("Expanding points which have changed\n" );
2716-
2714+ dbg (lvl_error , "Expanding points which have changed" );
27172715 route_graph_compute_shortest_path (this_ -> graph , this_ -> vehicleprofile , NULL );
2718-
2719- printf ("Point expansion complete, recalculating route path\n" );
2720-
2716+ dbg (lvl_error , "Point expansion complete, recalculating route path" );
27212717 route_path_update_done (this_ , 0 );
27222718}
27232719
@@ -3839,8 +3835,7 @@ static void rm_rect_destroy(struct map_rect_priv *mr) {
38393835 }
38403836 if (mr -> path ) {
38413837 mr -> path -> in_use -- ;
3842- if (mr -> path -> update_required && (mr -> path -> in_use == 1 )
3843- && (mr -> mpriv -> route -> route_status & ~route_status_destination_set ))
3838+ if (mr -> path -> update_required && (mr -> path -> in_use == 1 ) && (mr -> mpriv -> route -> route_status & ~route_status_destination_set ))
38443839 route_path_update_done (mr -> mpriv -> route , mr -> path -> update_required - 1 );
38453840 else if (!mr -> path -> in_use )
38463841 g_free (mr -> path );
@@ -4167,8 +4162,11 @@ int route_set_attr(struct route *this_, struct attr *attr) {
41674162 int attr_updated = 0 ;
41684163 switch (attr -> type ) {
41694164 case attr_route_status :
4165+ dbg (lvl_debug , "current route_status = %i" , this_ -> route_status );
41704166 attr_updated = (this_ -> route_status != attr -> u .num );
41714167 this_ -> route_status = attr -> u .num ;
4168+ dbg (lvl_debug , "route_status set to: %i" , attr -> u .num );
4169+ dbg (lvl_debug , "attr_updated (0 or 1): %i" , attr_updated );
41724170 break ;
41734171 case attr_destination :
41744172 route_set_destination (this_ , attr -> u .pcoord , 1 );
@@ -4180,6 +4178,7 @@ int route_set_attr(struct route *this_, struct attr *attr) {
41804178 return route_set_position_flags (this_ , attr -> u .pcoord , route_path_flag_no_rebuild );
41814179 case attr_vehicle :
41824180 attr_updated = (this_ -> v != attr -> u .vehicle );
4181+ dbg (lvl_debug , "vehicle attribute attr_updated: %i" , attr_updated );
41834182 this_ -> v = attr -> u .vehicle ;
41844183 if (attr_updated ) {
41854184 struct attr g ;
@@ -4270,9 +4269,7 @@ int route_get_attr(struct route *this_, enum attr_type type, struct attr *attr,
42704269 attr -> u .num = this_ -> route_status ;
42714270 break ;
42724271 case attr_destination_time :
4273- if (this_ -> path2
4274- && (this_ -> route_status == route_status_path_done_new
4275- || this_ -> route_status == route_status_path_done_incremental )) {
4272+ if (this_ -> path2 && (this_ -> route_status == route_status_path_done_new || this_ -> route_status == route_status_path_done_incremental )) {
42764273 struct route_path * path = this_ -> path2 ;
42774274 attr -> u .num = 0 ;
42784275 while (path ) {
@@ -4284,9 +4281,7 @@ int route_get_attr(struct route *this_, enum attr_type type, struct attr *attr,
42844281 ret = 0 ;
42854282 break ;
42864283 case attr_destination_length :
4287- if (this_ -> path2
4288- && (this_ -> route_status == route_status_path_done_new
4289- || this_ -> route_status == route_status_path_done_incremental )) {
4284+ if (this_ -> path2 && (this_ -> route_status == route_status_path_done_new || this_ -> route_status == route_status_path_done_incremental )) {
42904285 struct route_path * path = this_ -> path2 ;
42914286 attr -> u .num = 0 ;
42924287 while (path ) {
0 commit comments