X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4e78565ea6b354a0e6250a87b483f909665a0ac3..6e4acd2e5a41c2159da6d53dd858d6f6ee7e6fa5:/examples/msg/bittorrent/bittorrent.c diff --git a/examples/msg/bittorrent/bittorrent.c b/examples/msg/bittorrent/bittorrent.c index d6fd85d69c..c7157b6500 100644 --- a/examples/msg/bittorrent/bittorrent.c +++ b/examples/msg/bittorrent/bittorrent.c @@ -1,12 +1,13 @@ -/* Copyright (c) 2012. The SimGrid Team. +/* Copyright (c) 2012-2015. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ + #include "bittorrent.h" #include "peer.h" #include "tracker.h" -#include +#include #include /** @@ -37,7 +38,7 @@ int main(int argc, char *argv[]) RngStream stream; snprintf(descr, sizeof descr, "RngSream<%s>", MSG_host_get_name(host)); stream = RngStream_CreateStream(descr); - MSG_host_set_data(host, stream); + MSG_host_set_property_value(host, "stream", (char*)stream, NULL); } MSG_function_register("tracker", tracker); @@ -48,7 +49,7 @@ int main(int argc, char *argv[]) MSG_main(); xbt_dynar_foreach(host_list, i, host) { - RngStream stream = MSG_host_get_data(host); + RngStream stream = (RngStream) MSG_host_get_property_value(host, "stream"); RngStream_DeleteStream(&stream); } xbt_dynar_free(&host_list);