X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/982cab33412abf91552a74e5cb567164d4a9a647..08835cc95982fa241576ee7b09006d5f97914584:/src/surf/sg_platf.cpp diff --git a/src/surf/sg_platf.cpp b/src/surf/sg_platf.cpp index 8cfb69d991..9fa57c7a29 100644 --- a/src/surf/sg_platf.cpp +++ b/src/surf/sg_platf.cpp @@ -151,7 +151,14 @@ void sg_platf_new_host(sg_platf_host_cbarg_t host) cpu->setStateTrace(host->state_trace); if (host->speed_trace) cpu->setSpeedTrace(host->speed_trace); - surf_host_model->createHost(host->id, netcard, cpu, host->properties)->attach(h); + surf_host_model->createHost(host->id, netcard, cpu)->attach(h); + + if (host->properties) { + xbt_dict_cursor_t cursor=NULL; + char *key,*data; + xbt_dict_foreach(host->properties,cursor,key,data) + h->setProperty(key,data); + } if (host->pstate != 0) cpu->setPState(host->pstate); @@ -788,7 +795,7 @@ static void surf_config_models_setup() * @param AS_id name of this autonomous system. Must be unique in the platform * @param wanted_routing_type one of Full, Floyd, Dijkstra or similar. Full list in the variable routing_models, in src/surf/surf_routing.c */ -void sg_platf_new_AS_begin(sg_platf_AS_cbarg_t AS) +simgrid::s4u::As * sg_platf_new_AS_begin(sg_platf_AS_cbarg_t AS) { if (!surf_parse_models_setup_already_called) { /* Initialize the surf models. That must be done after we got all config, and before we need the models. @@ -854,6 +861,8 @@ void sg_platf_new_AS_begin(sg_platf_AS_cbarg_t AS) simgrid::surf::asCreatedCallbacks(new_as); if (TRACE_is_enabled()) sg_instr_AS_begin(AS); + + return new_as; } /**