Adam Ierymenko 10 лет назад
Родитель
Сommit
cb6fd3afb3
2 измененных файлов с 3 добавлено и 2 удалено
  1. 2 1
      testnet/TestEthernetTap.cpp
  2. 1 1
      testnet/TestEthernetTap.hpp

+ 2 - 1
testnet/TestEthernetTap.cpp

@@ -78,9 +78,10 @@ TestEthernetTap::TestEthernetTap(
 
 TestEthernetTap::~TestEthernetTap()
 {
+	static const TestFrame zf;
 	{
 		Mutex::Lock _l(_pq_m);
-		_pq.push(TestFrame()); // 0 length frame = exit
+		_pq.push(zf); // 0 length frame = exit
 	}
 	_pq_c.signal();
 	Thread::join(_thread);

+ 1 - 1
testnet/TestEthernetTap.hpp

@@ -63,7 +63,7 @@ class TestEthernetTap : public EthernetTap
 private:
 	struct TestFrame
 	{
-		TestFrame() : etherType(0),len(0) {}
+		TestFrame() : from(),to(),etherType(0),len(0) {}
 		TestFrame(const MAC &f,const MAC &t,const void *d,unsigned int et,unsigned int l) :
 			from(f),
 			to(t),