Skip to content

Commit

Permalink
Transports/UDP: update trace parameter in Listener when task's trace_…
Browse files Browse the repository at this point in the history
…in parameter is updated.
  • Loading branch information
Bernardo-Gabriel committed Jan 23, 2025
1 parent cc163a5 commit ccf6679
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Transports/UDP/Listener.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,13 @@ namespace Transports
m_trace(trace),
m_contacts(contact_timeout),
m_lcomms(lcomms)
{ }
{ }

void
setTrace(bool trace)
{
m_trace = trace;
}

void
getContacts(std::vector<Contact>& list)
Expand Down
3 changes: 3 additions & 0 deletions src/Transports/UDP/Task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ namespace Transports
debug("limited communications simulation is not active");
m_comm_limitations = false;
}

if (m_listener != NULL)
m_listener->setTrace(m_args.trace_in);
}

void
Expand Down

0 comments on commit ccf6679

Please sign in to comment.