-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Open Port Request on Sending Side of IpSocket #2683
base: devel
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -945,6 +945,7 @@ sourceforge | |
Sourcetrail | ||
sourcing | ||
spacetech | ||
spammed | ||
sparc | ||
SPHINXBUILD | ||
SPHINXOPTS | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,7 +70,22 @@ | |
FW_ASSERT(pointer); | ||
SocketIpStatus status = SOCK_SUCCESS; | ||
SocketReadTask* self = reinterpret_cast<SocketReadTask*>(pointer); | ||
bool disconnected; | ||
Check notice Code scanning / CodeQL Use of basic integral type Note
disconnected uses the basic integral type bool rather than a typedef with size and signedness.
|
||
do { | ||
// Open a network connection if it has not already been open | ||
disconnected = false; | ||
// Lock mutex to avoid competing opens from other threads | ||
self->getSocketHandler().lockSocketMutex(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While this code block looks right, I believe it needs to be below (after start-up). I think a start-up needs to be added to to send too (following the same pattern). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line 98 of your file contains the original open that we should replace with this code |
||
if((not self->getSocketHandler().isOpened()) and (not self->m_stop)) { | ||
disconnected = (status = self->open()) != SOCK_SUCCESS; | ||
} | ||
self->getSocketHandler().unLockSocketMutex(); | ||
if (disconnected) { | ||
// comment out so message is not spammed when no IP endpoint exists | ||
// Fw::Logger::logMsg("[WARNING] Failed to open port on read side with status %d and errno %d\n", status, errno); | ||
Os::Task::delay(SOCKET_RETRY_INTERVAL_MS); | ||
Check warning Code scanning / CodeQL Unchecked return value Warning
The return value of non-void function
delay Error loading related location |
||
} | ||
|
||
// Open a network connection if it has not already been open | ||
if ((not self->getSocketHandler().isStarted()) and (not self->m_stop) and | ||
((status = self->startup()) != SOCK_SUCCESS)) { | ||
|
Check notice
Code scanning / CodeQL
Use of basic integral type Note