From 8e65833d607614996510a6a30a261c0c2ccf4e3f Mon Sep 17 00:00:00 2001 From: Jakob Meier Date: Fri, 8 Oct 2021 13:24:51 +0200 Subject: [PATCH 1/2] added bind call error string --- src/fsfw/osal/common/tcpipCommon.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/fsfw/osal/common/tcpipCommon.cpp b/src/fsfw/osal/common/tcpipCommon.cpp index 0fdbf867..2551496d 100644 --- a/src/fsfw/osal/common/tcpipCommon.cpp +++ b/src/fsfw/osal/common/tcpipCommon.cpp @@ -21,6 +21,9 @@ void tcpip::determineErrorStrings(Protocol protocol, ErrorSources errorSrc, std: if(errorSrc == ErrorSources::SETSOCKOPT_CALL) { srcString = "setsockopt call"; } + if(errorSrc == ErrorSources::BIND_CALL) { + srcString = "bind call"; + } else if(errorSrc == ErrorSources::SOCKET_CALL) { srcString = "socket call"; } -- 2.43.0 From a578f0390bce6c0a3d1d1e8d59764072f1075867 Mon Sep 17 00:00:00 2001 From: Jakob Meier Date: Fri, 8 Oct 2021 13:51:32 +0200 Subject: [PATCH 2/2] tcp server also parses TCs when client closes connection --- src/fsfw/osal/common/TcpTmTcServer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/fsfw/osal/common/TcpTmTcServer.cpp b/src/fsfw/osal/common/TcpTmTcServer.cpp index 8b34b1a3..7e6853fc 100644 --- a/src/fsfw/osal/common/TcpTmTcServer.cpp +++ b/src/fsfw/osal/common/TcpTmTcServer.cpp @@ -168,7 +168,10 @@ void TcpTmTcServer::handleServerOperation(socket_t& connSocket) { tcpConfig.tcpFlags ); if(retval == 0) { - // Client closed connection + size_t availableReadData = ringBuffer.getAvailableReadData(); + if(availableReadData > lastRingBufferSize) { + handleTcRingBufferData(availableReadData); + } return; } else if(retval > 0) { -- 2.43.0