mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-26 16:20:03 +02:00
destruct arping thread in Arping desturctor (#578)
This commit is contained in:
parent
74a2f07c7d
commit
f108ec82ea
@ -14,6 +14,15 @@ namespace sls {
|
|||||||
#define gettid() syscall(SYS_gettid)
|
#define gettid() syscall(SYS_gettid)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
Arping::Arping(){}
|
||||||
|
|
||||||
|
Arping::~Arping() {
|
||||||
|
if (IsRunning()) {
|
||||||
|
StopThread();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Arping::SetInterfacesAndIps(const int index, const std::string &interface,
|
void Arping::SetInterfacesAndIps(const int index, const std::string &interface,
|
||||||
const std::string &ip) {
|
const std::string &ip) {
|
||||||
|
|
||||||
|
@ -17,6 +17,9 @@ namespace sls {
|
|||||||
class Arping {
|
class Arping {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Arping();
|
||||||
|
~Arping();
|
||||||
|
|
||||||
void SetInterfacesAndIps(const int index, const std::string &interface,
|
void SetInterfacesAndIps(const int index, const std::string &interface,
|
||||||
const std::string &ip);
|
const std::string &ip);
|
||||||
pid_t GetThreadId() const;
|
pid_t GetThreadId() const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user