From 980ae14853d98a76fb3ceb2364d9bbd8e8a7ee2a Mon Sep 17 00:00:00 2001 From: Sathya Laufer Date: Wed, 3 May 2017 09:45:38 +0200 Subject: [PATCH 1/2] Base library changes --- src/BidCoSPeer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/BidCoSPeer.cpp b/src/BidCoSPeer.cpp index a545573..f5b44c7 100644 --- a/src/BidCoSPeer.cpp +++ b/src/BidCoSPeer.cpp @@ -861,13 +861,13 @@ void BidCoSPeer::removePeer(int32_t channel, int32_t address, int32_t remoteChan { try { - BaseLib::DisposableLockGuard peersGuard(_peersMutex); + std::unique_lock peersGuard(_peersMutex); for(std::vector>::iterator i = _peers[channel].begin(); i != _peers[channel].end(); ++i) { if((*i)->address == address && (*i)->channel == remoteChannel) { _peers[channel].erase(i); - peersGuard.dispose(); + peersGuard.unlock(); if(linksCentral[channel].find(address) != linksCentral[channel].end() && linksCentral[channel][address].find(remoteChannel) != linksCentral[channel][address].end()) linksCentral[channel][address].erase(linksCentral[channel][address].find(remoteChannel)); BaseLib::Database::DataRow data; data.push_back(std::shared_ptr(new BaseLib::Database::DataColumn(_peerID))); From 10e77aa43fd4d17fd9d8de62657c4d4f47f6ef10 Mon Sep 17 00:00:00 2001 From: Sathya Laufer Date: Tue, 9 May 2017 13:36:48 +0200 Subject: [PATCH 2/2] Small changes --- src/PhysicalInterfaces/Cunx.cpp | 2 -- src/PhysicalInterfaces/HM-CFG-LAN.cpp | 2 -- src/PhysicalInterfaces/HM-LGW.cpp | 2 -- 3 files changed, 6 deletions(-) diff --git a/src/PhysicalInterfaces/Cunx.cpp b/src/PhysicalInterfaces/Cunx.cpp index 52d4e4e..8974653 100644 --- a/src/PhysicalInterfaces/Cunx.cpp +++ b/src/PhysicalInterfaces/Cunx.cpp @@ -40,8 +40,6 @@ Cunx::Cunx(std::shared_ptr settings _out.init(GD::bl); _out.setPrefix(GD::out.getPrefix() + "CUNX \"" + settings->id + "\": "); - signal(SIGPIPE, SIG_IGN); - _socket = std::unique_ptr(new BaseLib::TcpSocket(_bl)); if(settings->listenThreadPriority == -1) diff --git a/src/PhysicalInterfaces/HM-CFG-LAN.cpp b/src/PhysicalInterfaces/HM-CFG-LAN.cpp index 295fc0a..638c6f2 100644 --- a/src/PhysicalInterfaces/HM-CFG-LAN.cpp +++ b/src/PhysicalInterfaces/HM-CFG-LAN.cpp @@ -38,8 +38,6 @@ HM_CFG_LAN::HM_CFG_LAN(std::shared_ptrid + "\": "); - signal(SIGPIPE, SIG_IGN); - _socket = std::unique_ptr(new BaseLib::TcpSocket(_bl)); if(!settings) diff --git a/src/PhysicalInterfaces/HM-LGW.cpp b/src/PhysicalInterfaces/HM-LGW.cpp index fe419a4..ec0aff9 100644 --- a/src/PhysicalInterfaces/HM-LGW.cpp +++ b/src/PhysicalInterfaces/HM-LGW.cpp @@ -37,8 +37,6 @@ HM_LGW::HM_LGW(std::shared_ptr sett _out.init(GD::bl); _out.setPrefix(_out.getPrefix() + "HM-LGW \"" + settings->id + "\": "); - signal(SIGPIPE, SIG_IGN); - _initCompleteKeepAlive = false; _socket = std::unique_ptr(new BaseLib::TcpSocket(_bl)); _socketKeepAlive = std::unique_ptr(new BaseLib::TcpSocket(_bl));