X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/8d32c7ffa94dd5e1fc62a06ddab007a7b3f711e3..23c1419c93c4344d64d1b607c8f557d60ecb6f08:/src/surf/network_constant.c diff --git a/src/surf/network_constant.c b/src/surf/network_constant.c index 7b811c41e8..c733bc8d3b 100644 --- a/src/surf/network_constant.c +++ b/src/surf/network_constant.c @@ -21,14 +21,12 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_network); static random_data_t random_latency = NULL; static int host_number_int = 0; -static void netcste_count_hosts(void) -{ +static void netcste_count_hosts(sg_platf_host_cbarg_t h) { host_number_int++; } -static void netcste_define_callbacks(const char *file) -{ - surfxml_add_callback(STag_surfxml_host_cb_list, &netcste_count_hosts); +static void netcste_define_callbacks(void) { + sg_platf_host_add_cb(netcste_count_hosts); } static int netcste_resource_used(void *resource_id) @@ -191,7 +189,7 @@ static void netcste_finalize(void) -void surf_network_model_init_Constant(const char *filename) +void surf_network_model_init_Constant() { xbt_assert(surf_network_model == NULL); if (surf_network_model) @@ -233,7 +231,7 @@ void surf_network_model_init_Constant(const char *filename) if (!random_latency) random_latency = random_new(RAND, 100, 0.0, 1.0, .125, .034); - netcste_define_callbacks(filename); + netcste_define_callbacks(); xbt_dynar_push(model_list, &surf_network_model); update_model_description(surf_network_model_description,