X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9712e9b69da18f664d51ce81323234f18494fdd3..acb292ef96c6533590b4adcfb7c6187f798f0f39:/src/surf/ns3/ns3_simulator.hpp diff --git a/src/surf/ns3/ns3_simulator.hpp b/src/surf/ns3/ns3_simulator.hpp index c007c2592d..f339e6468f 100644 --- a/src/surf/ns3/ns3_simulator.hpp +++ b/src/surf/ns3/ns3_simulator.hpp @@ -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