NetAnim: Prevent closing the routing trace when splitting files

This commit is contained in:
John Abraham
2013-01-27 15:56:34 -08:00
parent ec4007ca27
commit ceda10db66
2 changed files with 7 additions and 3 deletions

View File

@@ -157,7 +157,7 @@ void AnimationInterface::StartNewTraceFile ()
{
return;
}
StopAnimation ();
StopAnimation (true);
m_outputFileName = m_originalFileName + "-" + oss.str ();
StartAnimation (true);
++i;
@@ -673,7 +673,7 @@ void AnimationInterface::ConnectCallbacks ()
}
void AnimationInterface::StopAnimation ()
void AnimationInterface::StopAnimation (bool onlyAnimation)
{
m_started = false;
NS_LOG_INFO ("Stopping Animation");
@@ -687,6 +687,10 @@ void AnimationInterface::StopAnimation ()
std::fclose (m_f);
}
m_outputFileSet = false;
if (onlyAnimation)
{
return;
}
if (m_routingF)
{
WriteN (GetXMLClose ("anim"), m_routingF);

View File

@@ -455,7 +455,7 @@ private:
* \brief Closes the interface to the animator.
*
*/
void StopAnimation ();
void StopAnimation (bool onlyAnimation = false);
void DevTxTrace (std::string context,
Ptr<const Packet> p,