From: Maxim Mamontov <faust@gts.dp.ua>
Date: Tue, 7 Dec 2010 15:23:22 +0000 (+0200)
Subject: Из плагина захвата трафика cap_ether убраны неиспользуемые типы данных и
X-Git-Tag: 2.407-rc3~333
X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/41793fe3ee6f5b0ddbb8d20afad9ffcc3a923e22?ds=sidebyside

Из плагина захвата трафика cap_ether убраны неиспользуемые типы данных и
члены. Так-же инициализация членов класса реализована через список
инициализации в конструкторе
---

diff --git a/projects/stargazer/plugins/capture/ether_linux/ether_cap.cpp b/projects/stargazer/plugins/capture/ether_linux/ether_cap.cpp
index 5c76be91..11aa475a 100644
--- a/projects/stargazer/plugins/capture/ether_linux/ether_cap.cpp
+++ b/projects/stargazer/plugins/capture/ether_linux/ether_cap.cpp
@@ -92,9 +92,11 @@ return "Ether_cap v.1.2";
 }
 //-----------------------------------------------------------------------------
 ETHER_CAP::ETHER_CAP()
+    : nonstop(false),
+      isRunning(false),
+      capSock(-1),
+      traffCnt(NULL)
 {
-isRunning = false;
-nonstop = false;
 }
 //-----------------------------------------------------------------------------
 void ETHER_CAP::SetTraffcounter(TRAFFCOUNTER * tc)
diff --git a/projects/stargazer/plugins/capture/ether_linux/ether_cap.h b/projects/stargazer/plugins/capture/ether_linux/ether_cap.h
index 9643076b..fde7d3a0 100644
--- a/projects/stargazer/plugins/capture/ether_linux/ether_cap.h
+++ b/projects/stargazer/plugins/capture/ether_linux/ether_cap.h
@@ -26,9 +26,10 @@
 #ifndef ETHER_CAP_H
 #define ETHER_CAP_H
 
-#include <string>
 #include <pthread.h>
 
+#include <string>
+
 #include "base_plugin.h"
 #include "base_settings.h"
 #include "../../../traffcounter.h"
@@ -37,13 +38,6 @@ using namespace std;
 
 extern "C" BASE_PLUGIN * GetPlugin();
 
-//-----------------------------------------------------------------------------
-class ETHER_CAP_SETTINGS
-{
-public:
-    const string& GetStrError() const { static string s; return s; }
-    int ParseSettings(const MODULE_SETTINGS &) { return 0; }
-};
 //-----------------------------------------------------------------------------
 class ETHER_CAP :public BASE_PLUGIN
 {
@@ -77,8 +71,6 @@ private:
     int                 EthCapRead(void * buffer, int blen, char ** iface);
     bool                WaitPackets(int sd) const;
 
-    ETHER_CAP_SETTINGS  capSettings;
-
     mutable string      errorStr;
 
     pthread_t           thread;