NetAnim:Use overloaded WriteN for xml
authorJohn Abraham <john.abraham@gatech.edu>
Thu, 25 Aug 2011 06:36:33 -0400
changeset 7467 31a035594f68
parent 7466 28a00b2505ae
child 7468 287082f2be5c
NetAnim:Use overloaded WriteN for xml
src/netanim/model/animation-interface.cc
--- a/src/netanim/model/animation-interface.cc	Wed Aug 24 09:00:50 2011 -0700
+++ b/src/netanim/model/animation-interface.cc	Thu Aug 25 06:36:33 2011 -0400
@@ -246,6 +246,7 @@
         {
           Vector v = GetPosition (n);
           oss << GetXMLOpenClose_node (0,n->GetId (),v.x,v.y);
+	  WriteN (m_fHandle, oss.str ());
         }
       else
         {
@@ -253,9 +254,8 @@
           Vector v = GetPosition (n);
           oss << "0.0 N " << n->GetId () 
               << " " << v.x << " " << v.y << std::endl;
+      	  WriteN (m_fHandle, oss.str ().c_str (), oss.str ().length ());
         }
-
-      WriteN (m_fHandle, oss.str ().c_str (), oss.str ().length ());
     }
   NS_LOG_INFO ("Setting p2p links");
   // Now dump the p2p links