Index: abstract.c =================================================================== --- abstract.c (revision 10098) +++ abstract.c (revision 10099) @@ -65,7 +65,7 @@ { vtp0_uninit(&net->conns); free(net->name); - free(net->locname); + free(net->name_loc); csch_ahdr_uninit(&net->hdr); } @@ -91,7 +91,7 @@ htsp_uninit(&comp->ports); htsp_uninit(&comp->busports); free(comp->name); - free(comp->locname); + free(comp->name_loc); csch_ahdr_uninit(&comp->hdr); } @@ -242,8 +242,24 @@ csch_anet_t *net = calloc(sizeof(csch_anet_t), 1); csch_aobj_init(abs, &net->hdr, CSCH_ATYPE_NET); net->name = rnd_strdup(name_glob); + net->name_loc = rnd_strdup(name_loc); net->no_uname = set_no_uname; + htsp_set(&abs->nets, net->name, net); + if (hlev != NULL) { + switch(scope) { + case CSCH_ASCOPE_AUTO: /* if we got here, we are adding it as global */ + case CSCH_ASCOPE_GLOBAL: + case CSCH_ASCOPE_unknown: + break; /* has no impact on local */ + + case CSCH_ASCOPE_SUBTREE_LOCAL: + case CSCH_ASCOPE_SHEET_LOCAL: + case CSCH_ASCOPE_SUBTREE_AUTO: + htsp_set(&hlev->nets, net->name_loc, net); + break; + } + } return net; }