View | Details | Raw Unified | Return to bug 1050
Collapse All | Expand All

(-)a/src/applications/model/ping6.cc (-1 / +3 lines)
 Lines 162-168    Link Here 
162
  NS_LOG_FUNCTION_NOARGS ();
162
  NS_LOG_FUNCTION_NOARGS ();
163
  NS_ASSERT (m_sendEvent.IsExpired ());
163
  NS_ASSERT (m_sendEvent.IsExpired ());
164
  Ptr<Packet> p = 0;
164
  Ptr<Packet> p = 0;
165
  uint8_t data[m_size];
165
  uint8_t* data = new uint8_t[m_size];
166
  Ipv6Address src;
166
  Ipv6Address src;
167
  Ptr<Ipv6> ipv6 = GetNode ()->GetObject<Ipv6> ();
167
  Ptr<Ipv6> ipv6 = GetNode ()->GetObject<Ipv6> ();
168
168
 Lines 221-226    Link Here 
221
    {
221
    {
222
      ScheduleTransmit (m_interval);
222
      ScheduleTransmit (m_interval);
223
    }
223
    }
224
225
  delete[] data;
224
}
226
}
225
227
226
void Ping6::HandleRead (Ptr<Socket> socket)
228
void Ping6::HandleRead (Ptr<Socket> socket)
(-)a/src/applications/model/v4ping.cc (-2 / +4 lines)
 Lines 122-128    Link Here 
122
122
123
	  if (i != m_sent.end () && echo.GetIdentifier () == 0)
123
	  if (i != m_sent.end () && echo.GetIdentifier () == 0)
124
	    {
124
	    {
125
              uint32_t buf[m_size / 4];
125
              uint32_t* buf = new uint32_t[m_size / 4];
126
	      uint32_t dataSize = echo.GetDataSize ();
126
	      uint32_t dataSize = echo.GetDataSize ();
127
              uint32_t nodeId;
127
              uint32_t nodeId;
128
              uint32_t appId;
128
              uint32_t appId;
 Lines 153-158    Link Here 
153
		        }
153
		        }
154
		    }
154
		    }
155
		}
155
		}
156
	      delete[] buf;
156
	    }
157
	    }
157
	}
158
	}
158
    }
159
    }
 Lines 192-198    Link Here 
192
  // (where any difference would show up anyway) and borrow that code.  Don't
193
  // (where any difference would show up anyway) and borrow that code.  Don't
193
  // be too surprised when you see that this is a little endian convention.
194
  // be too surprised when you see that this is a little endian convention.
194
  //
195
  //
195
  uint8_t data[m_size];
196
  uint8_t* data = new uint8_t[m_size];
196
  for (uint32_t i = 0; i < m_size; ++i) data[i] = 0;
197
  for (uint32_t i = 0; i < m_size; ++i) data[i] = 0;
197
  NS_ASSERT (m_size >= 16);
198
  NS_ASSERT (m_size >= 16);
198
  
199
  
 Lines 216-221    Link Here 
216
  m_sent.insert (std::make_pair (m_seq - 1, Simulator::Now()));
217
  m_sent.insert (std::make_pair (m_seq - 1, Simulator::Now()));
217
  m_socket->Send (p, 0);
218
  m_socket->Send (p, 0);
218
  m_next = Simulator::Schedule (m_interval, & V4Ping::Send, this);
219
  m_next = Simulator::Schedule (m_interval, & V4Ping::Send, this);
220
  delete[] data;
219
}
221
}
220
222
221
void 
223
void 

Return to bug 1050