X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7369715466314d1ab38ee29586b632717c98fcad..94f76952308050e13df40d4df3852da353f73f35:/src/s4u/s4u_Comm.cpp diff --git a/src/s4u/s4u_Comm.cpp b/src/s4u/s4u_Comm.cpp index 36b5702cbf..bcf557de35 100644 --- a/src/s4u/s4u_Comm.cpp +++ b/src/s4u/s4u_Comm.cpp @@ -299,11 +299,7 @@ Actor* Comm::get_sender() const CommPtr Comm::set_copy_data_callback(void (*callback)(kernel::activity::CommImpl*, void*, size_t)) { - static void (*saved_callback)(kernel::activity::CommImpl*, void*, size_t); - saved_callback = callback; - copy_data_function_ = [](simgrid::kernel::activity::CommImpl* comm, void* buff, size_t size) { - saved_callback(comm, buff, size); - }; + copy_data_function_ = callback; return this; }