X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d656f9465e7b1c36319f86eeafdcec58fe9551a4..d4c5782fb4da7b7cf83b66df05197bd597796f70:/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