network_link_GTNETS_t gtnets_link;
/* If link already exists, nothing to do (FIXME: check that multiple definition match?) */
- if (xbt_dict_get_or_null(link_set, name)) {
+ if (xbt_dict_get_or_null(surf_network_model->resource_set, name)) {
return;
}
/* Add the properties */
gtnets_link->properties = props;
- xbt_dict_set(link_set, name, gtnets_link, link_free);
+ xbt_dict_set(surf_network_model->resource_set, name, gtnets_link, link_free);
return;
}
xbt_dynar_foreach(links, cpt, link) {
TRY {
- link_list[nb_link++] = xbt_dict_get(link_set, link);
+ link_list[nb_link++] = xbt_dict_get(surf_network_model->resource_set, link);
}
CATCH(e) {
RETHROW1("Link %s not found (dict raised this exception: %s)", link);
xbt_dynar_foreach(links, cpt, link) {
TRY {
- link_list[nb_link++] = xbt_dict_get(link_set, link);
+ link_list[nb_link++] = xbt_dict_get(surf_network_model->resource_set, link);
}
CATCH(e) {
RETHROW1("Link %s not found (dict raised this exception: %s)", link);
static void finalize(void)
{
- xbt_dict_free(&link_set);
+ xbt_dict_free(&surf_network_model->resource_set);
surf_model_exit(surf_network_model);
/*for the props of the link */
surf_network_model->get_properties = get_properties;
- link_set = xbt_dict_new();
-
/* KF: Added the initialization for GTNetS interface */
if (gtnets_initialize()) {
xbt_assert0(0, "impossible to initialize GTNetS interface");