File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -220,7 +220,8 @@ void SocketComponentHelper::readLoop() {
220220 status = this ->recv (data, size);
221221 if ((status != SOCK_SUCCESS) && (status != SOCK_INTERRUPTED_TRY_AGAIN) &&
222222 (status != SOCK_NO_DATA_AVAILABLE)) {
223- Fw::Logger::log (" [WARNING] Failed to recv from port with status %d and errno %d\n " , status, errno);
223+ Fw::Logger::log (" [WARNING] %s failed to recv from port with status %d and errno %d\n " ,
224+ this ->m_task .getName ().toChar (), status, errno);
224225 this ->close ();
225226 buffer.setSize (0 );
226227 } else {
@@ -297,7 +298,8 @@ void SocketComponentHelper::reconnectLoop() {
297298 // Reopen Case 3: Keep trying to reconnect - NO reconnect
298299 // state change
299300 else {
300- Fw::Logger::log (" [WARNING] Failed to open port with status %d and errno %d\n " , status, errno);
301+ Fw::Logger::log (" [WARNING] %s failed to open port with status %d and errno %d\n " ,
302+ this ->m_task .getName ().toChar (), status, errno);
301303 (void )Os::Task::delay (SOCKET_RETRY_INTERVAL);
302304 }
303305 } else {
Original file line number Diff line number Diff line change @@ -174,6 +174,11 @@ bool Task::isCooperative() {
174174 return this ->m_delegate .isCooperative ();
175175}
176176
177+ TaskString Task::getName () {
178+ Os::ScopeLock lock (this ->m_lock );
179+ return this ->m_name ;
180+ }
181+
177182FwTaskPriorityType Task::getPriority () {
178183 Os::ScopeLock lock (this ->m_lock );
179184 return this ->m_priority ;
Original file line number Diff line number Diff line change @@ -346,6 +346,9 @@ class Task final : public TaskInterface {
346346 // ! \return true if cooperative, false otherwise
347347 bool isCooperative () override ;
348348
349+ // ! \brief get the task name
350+ TaskString getName ();
351+
349352 // ! \brief get the task priority
350353 FwTaskPriorityType getPriority ();
351354
You can’t perform that action at this time.
0 commit comments