X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f734ec7475682eb90323e804cbcfddd7e4523992..e5fac81b878c12bafe94ab9407bad0080a3d1581:/src/surf/ns3/ns3_simulator.hpp diff --git a/src/surf/ns3/ns3_simulator.hpp b/src/surf/ns3/ns3_simulator.hpp index c007c2592d..743f0031dd 100644 --- a/src/surf/ns3/ns3_simulator.hpp +++ b/src/surf/ns3/ns3_simulator.hpp @@ -18,7 +18,7 @@ #include #include -class SgFlow { +class XBT_PRIVATE SgFlow { public: SgFlow(uint32_t totalBytes, simgrid::surf::NetworkNS3Action* action); @@ -33,14 +33,11 @@ public: void StartFlow(ns3::Ptr sock, const char* to, uint16_t port_number); -static inline const char* transformSocketPtr(ns3::Ptr localSocket) +static inline std::string transformSocketPtr(ns3::Ptr localSocket) { - static char key[24]; std::stringstream sstream; sstream << localSocket; - snprintf(key, 24, "%s", sstream.str().c_str()); - - return key; + return sstream.str(); } #endif