renamed mutex helper

This commit is contained in:
Robin Müller 2021-03-09 21:21:01 +01:00
parent 3e9c19ee11
commit 7525c88392
2 changed files with 3 additions and 5 deletions

View File

@ -40,8 +40,6 @@ public:
#endif /* FSFW_CPP_OSTREAM_ENABLED == 1 */ #endif /* FSFW_CPP_OSTREAM_ENABLED == 1 */
} }
#else #else
/* To avoid unused variable warning */
static_cast<void>(status);
#endif /* FSFW_VERBOSE_LEVEL >= 1 */ #endif /* FSFW_VERBOSE_LEVEL >= 1 */
} }

View File

@ -1,6 +1,6 @@
#include "TmTcUnixUdpBridge.h" #include "TmTcUnixUdpBridge.h"
#include "../../serviceinterface/ServiceInterface.h" #include "../../serviceinterface/ServiceInterface.h"
#include "../../ipc/MutexHelper.h" #include "../../ipc/MutexGuard.h"
#include <errno.h> #include <errno.h>
#include <arpa/inet.h> #include <arpa/inet.h>
@ -69,7 +69,7 @@ TmTcUnixUdpBridge::~TmTcUnixUdpBridge() {
ReturnValue_t TmTcUnixUdpBridge::sendTm(const uint8_t *data, size_t dataLen) { ReturnValue_t TmTcUnixUdpBridge::sendTm(const uint8_t *data, size_t dataLen) {
int flags = 0; int flags = 0;
MutexHelper lock(mutex, MutexIF::TimeoutType::WAITING, 10); MutexGuard lock(mutex, MutexIF::TimeoutType::WAITING, 10);
if(ipAddrAnySet){ if(ipAddrAnySet){
clientAddress.sin_addr.s_addr = htons(INADDR_ANY); clientAddress.sin_addr.s_addr = htons(INADDR_ANY);
@ -100,7 +100,7 @@ ReturnValue_t TmTcUnixUdpBridge::sendTm(const uint8_t *data, size_t dataLen) {
} }
void TmTcUnixUdpBridge::checkAndSetClientAddress(sockaddr_in& newAddress) { void TmTcUnixUdpBridge::checkAndSetClientAddress(sockaddr_in& newAddress) {
MutexHelper lock(mutex, MutexIF::TimeoutType::WAITING, 10); MutexGuard lock(mutex, MutexIF::TimeoutType::WAITING, 10);
// char ipAddress [15]; // char ipAddress [15];
#if FSFW_CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1