important bugfix for TCP server #618
No reviewers
Labels
No Label
API Change
Breaking API Change
bug
build
cosmetics
Documentation
duplicate
feature
help wanted
hotfix
invalid
question
Refactor
Tests
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: fsfw/fsfw#618
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "mueller/tcp-server-bugfix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
MutexGuard
was not created properly inTcpTmTcServer::handleTmSending(socket_t connSocket, bool& tmSent)
clang-tidy
improvements.There is a C++17 feature in this pull request.
@ -263,3 +264,3 @@
ReturnValue_t TcpTmTcServer::handleTmSending(socket_t connSocket, bool& tmSent) {
// Access to the FIFO is mutex protected because it is filled by the bridge
MutexGuard(tmtcBridge->mutex, tmtcBridge->timeoutType, tmtcBridge->mutexTimeoutMs);
MutexGuard mg(tmtcBridge->mutex, tmtcBridge->timeoutType, tmtcBridge->mutexTimeoutMs);
Oh how did you find that? clang-tidy?
Yes. Marked yelow, complained that it is immediately destroyed after creation.
@ -101,3 +102,3 @@
ReturnValue_t initializeAfterTaskCreation() override;
std::string getTcpPort() const;
[[nodiscard]] const std::string& getTcpPort() const;
nodiscard is a c++17 extension. If we want to use that we have to change the minimum C++ Standard for the fsfw