Index: trunk/src/plugins/rt_topo/crbs.c =================================================================== --- trunk/src/plugins/rt_topo/crbs.c (revision 1365) +++ trunk/src/plugins/rt_topo/crbs.c (revision 1366) @@ -113,6 +113,20 @@ return res; } +static int crbs_coll_ingore_tn_line_cb(grbs_t *grbs, grbs_2net_t *tn, grbs_line_t *l) +{ + crbs_2net_t *lctn = l->user_data; + crbs_2net_t *tctn = tn->user_data; + + assert(tctn != NULL); + + if (lctn == NULL) + return 0; + + return lctn->net == tctn->net; +} + + crbs_point_t *crbs_point_new(crbs_t *crbs) { crbs_point_t *p = calloc(sizeof(crbs_point_t), 1); @@ -161,6 +175,8 @@ crbs->grbs.coll_report_cb = crbs_coll_report_cb; crbs->grbs.coll_check_arc = crbs_coll_check_arc_cb; crbs->grbs.coll_check_line = crbs_coll_check_line_cb; + crbs->grbs.coll_ingore_tn_line= crbs_coll_ingore_tn_line_cb; + crbs->grbs.user_data = crbs; htad_init(&crbs->addrs, htad_hash, grbs_addr_hash_keyeq); Index: trunk/src/plugins/rt_topo/crbs_cdt.c =================================================================== --- trunk/src/plugins/rt_topo/crbs_cdt.c (revision 1365) +++ trunk/src/plugins/rt_topo/crbs_cdt.c (revision 1366) @@ -27,6 +27,7 @@ */ #include +#include #include "geo.h" #include "gengeo2d/cline.h" @@ -38,12 +39,14 @@ e->data = obj; \ if (add_grbs) { \ crbs_point_t *cp1 = p1->data, *cp2 = p2->data; \ + grbs_line_t *gl; \ grbs_2net_t *tn = grbs_2net_new(&crbs->grbs, cop, clr); \ crbs_2net_t *ctn = calloc(sizeof(crbs_2net_t), 1); \ tn->user_data = ctn; \ ctn->tn = NULL; \ ctn->net = obj->hdr.net; \ - grbs_line_realize(&crbs->grbs, tn, cp1->gpt, cp2->gpt); \ + gl = grbs_line_realize(&crbs->grbs, tn, cp1->gpt, cp2->gpt); \ + gl->user_data = ctn; \ } \ } while(0) \ Index: trunk/src/plugins/rt_topo/crbs_route.c =================================================================== --- trunk/src/plugins/rt_topo/crbs_route.c (revision 1365) +++ trunk/src/plugins/rt_topo/crbs_route.c (revision 1366) @@ -509,9 +509,13 @@ rt_topo_crbs_cdt_inc_edge(crbs, pa, na); } - for(na = firsta; na != NULL; na = na->user_data) - if (grbs_path_realize(&crbs->grbs, crbs->routing_tn, na, 0) == NULL) - abort(); + for(na = firsta; na != NULL; na = na->user_data) { + grbs_arc_t *arc = grbs_path_realize(&crbs->grbs, crbs->routing_tn, na, 0); + if (arc != NULL) + arc->user_data = ctn; + else + abort(); /* we have validated the path so this can not fail */ + } { char tmp[128];