X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c4f1fe5c9bd8fa83fd0cdf873f27634930e02d95..245ddc814c1b3a8ee9126f56123466d99bb523cd:/src/surf/callbacks.cpp diff --git a/src/surf/callbacks.cpp b/src/surf/callbacks.cpp index 86dedde039..7af364a0fc 100644 --- a/src/surf/callbacks.cpp +++ b/src/surf/callbacks.cpp @@ -10,19 +10,9 @@ #include "src/surf/surf_interface.hpp" #include "src/surf/host_interface.hpp" -void surf_on_host_created(void (*callback)(sg_host_t)) -{ - hostCreatedCallbacks.connect([callback](Host* host) { - const char* id = host->getName(); - sg_host_t h = sg_host_by_name(id); - xbt_assert(h != NULL, "Host not found for name %s", id); - callback(h); - }); -} - void surf_on_storage_created(void (*callback)(sg_storage_t)) { - storageCreatedCallbacks.connect([callback](Storage* storage) { + simgrid::surf::storageCreatedCallbacks.connect([callback](simgrid::surf::Storage* storage) { const char* id = storage->getName(); // TODO, create sg_storage_by_name sg_storage_t s = xbt_lib_get_elm_or_null(storage_lib, id);