Index: trunk/src/plugins/rt_topo/crbs_route.c =================================================================== --- trunk/src/plugins/rt_topo/crbs_route.c (revision 1487) +++ trunk/src/plugins/rt_topo/crbs_route.c (revision 1488) @@ -320,7 +320,7 @@ for(;;) { crbs_point_t *pt; - if (a->grbs_idx >= 5) { + if (a->grbs_idx >= 3) { a->grbs_idx = 0; a->pt_idx++; } @@ -353,7 +353,7 @@ } - while(a->grbs_idx < 5) { + while(a->grbs_idx < 3) { if (crbs_trace_ast) { if ((curr->type & 0x0F) == ADDR_ARC_VCONCAVE) printf(" try from %s P%ld (real %.2f %.2f) to P%ld", from_type, curr->pt->uid, curr[1].pt->x, curr[1].pt->y, pt->gpt->uid); @@ -361,20 +361,16 @@ printf(" try from %s P%ld to P%ld", from_type, curr->pt->uid, pt->gpt->uid); } if (crbs->disable_vconcave) { - if (a->grbs_idx < 3) - a->grbs_idx = 3; + if (a->grbs_idx < 1) + a->grbs_idx = 1; } -#warning TODO: start indexing from 0, tune the above if() as well - if (a->grbs_idx < 2) - a->grbs_idx = 2; - /* prefer concave over convex; order matters when reaching target: first valid solution will stop the search */ switch(a->grbs_idx) { - case 2: if (crbs_trace_ast) printf(" vconcave"); next = crbs_next_hop(ctx, curr, pt, GRBS_ADIR_VCONCAVE); break; - case 3: if (crbs_trace_ast) printf(" convex ccw"); next = crbs_next_hop(ctx, curr, pt, GRBS_ADIR_CONVEX_CCW); break; - case 4: if (crbs_trace_ast) printf(" convex cw"); next = crbs_next_hop(ctx, curr, pt, GRBS_ADIR_CONVEX_CW); break; + case 0: if (crbs_trace_ast) printf(" vconcave"); next = crbs_next_hop(ctx, curr, pt, GRBS_ADIR_VCONCAVE); break; + case 1: if (crbs_trace_ast) printf(" convex ccw"); next = crbs_next_hop(ctx, curr, pt, GRBS_ADIR_CONVEX_CCW); break; + case 2: if (crbs_trace_ast) printf(" convex cw"); next = crbs_next_hop(ctx, curr, pt, GRBS_ADIR_CONVEX_CW); break; } a->grbs_idx++;