diff --git a/src/applications/model/onoff-application.cc b/src/applications/model/onoff-application.cc index a157be206..dcb526808 100644 --- a/src/applications/model/onoff-application.cc +++ b/src/applications/model/onoff-application.cc @@ -134,9 +134,10 @@ int64_t OnOffApplication::AssignStreams(int64_t stream) { NS_LOG_FUNCTION(this << stream); - m_onTime->SetStream(stream); - m_offTime->SetStream(stream + 1); - return 2; + auto currentStream = stream; + m_onTime->SetStream(currentStream++); + m_offTime->SetStream(currentStream++); + return (currentStream - stream); } void diff --git a/src/applications/model/three-gpp-http-variables.cc b/src/applications/model/three-gpp-http-variables.cc index cd615db54..ea862ac8d 100644 --- a/src/applications/model/three-gpp-http-variables.cc +++ b/src/applications/model/three-gpp-http-variables.cc @@ -298,18 +298,17 @@ int64_t ThreeGppHttpVariables::AssignStreams(int64_t stream) { NS_LOG_FUNCTION(this << stream); - - m_mtuSizeRng->SetStream(stream); - m_requestSizeRng->SetStream(stream + 1); - m_mainObjectGenerationDelayRng->SetStream(stream + 2); - m_mainObjectSizeRng->SetStream(stream + 3); - m_embeddedObjectGenerationDelayRng->SetStream(stream + 4); - m_embeddedObjectSizeRng->SetStream(stream + 5); - m_numOfEmbeddedObjectsRng->SetStream(stream + 6); - m_readingTimeRng->SetStream(stream + 7); - m_parsingTimeRng->SetStream(stream + 8); - - return 9; + auto currentStream = stream; + m_mtuSizeRng->SetStream(currentStream++); + m_requestSizeRng->SetStream(currentStream++); + m_mainObjectGenerationDelayRng->SetStream(currentStream++); + m_mainObjectSizeRng->SetStream(currentStream++); + m_embeddedObjectGenerationDelayRng->SetStream(currentStream++); + m_embeddedObjectSizeRng->SetStream(currentStream++); + m_numOfEmbeddedObjectsRng->SetStream(currentStream++); + m_readingTimeRng->SetStream(currentStream++); + m_parsingTimeRng->SetStream(currentStream++); + return (currentStream - stream); } void diff --git a/src/internet-apps/model/dhcp-client.cc b/src/internet-apps/model/dhcp-client.cc index 0c9975f6a..cd22f745b 100644 --- a/src/internet-apps/model/dhcp-client.cc +++ b/src/internet-apps/model/dhcp-client.cc @@ -145,8 +145,9 @@ int64_t DhcpClient::AssignStreams(int64_t stream) { NS_LOG_FUNCTION(this << stream); - m_ran->SetStream(stream); - return 1; + auto currentStream = stream; + m_ran->SetStream(currentStream++); + return (currentStream - stream); } void diff --git a/src/internet-apps/model/radvd.cc b/src/internet-apps/model/radvd.cc index 9caba53f9..7ae43d114 100644 --- a/src/internet-apps/model/radvd.cc +++ b/src/internet-apps/model/radvd.cc @@ -172,8 +172,9 @@ int64_t Radvd::AssignStreams(int64_t stream) { NS_LOG_FUNCTION(this << stream); - m_jitter->SetStream(stream); - return 1; + auto currentStream = stream; + m_jitter->SetStream(currentStream++); + return (currentStream - stream); } void