Skip to content

Commit

Permalink
RTT offset guess now doesn't rely on rtt_var, version updated
Browse files Browse the repository at this point in the history
  • Loading branch information
pawsten committed Nov 22, 2024
1 parent d246e8f commit 575eef0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions libnettracer/src/offsetguess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ bool OffsetGuessing::makeGuessingAttempt(int status_fd) {
template<typename T>
void OffsetGuessing::guessSimpleField(T& statusValue, const T& expectedValue, uint16_t& offset, guess_status_t& status, const std::string& fieldStr, const guess_field& next) {
if (statusValue == expectedValue) {
logger->debug("{} offset: {:#010x}", fieldStr, offset);
logger->info("{} offset: {:#010x}", fieldStr, offset);
status.what = next;
}
else {
Expand Down Expand Up @@ -264,10 +264,10 @@ bool OffsetGuessing::guessRTT(unsigned& currentAttempts, unsigned& currentReps,
const unsigned maxAttempts = 10; // that many offsets may be verified
const unsigned requiredReps = 3; // value at an offset must match with the expected value at least that many times in a row

if (status.rtt == expected.rtt && status.rtt_var == expected.rtt_var) {
if (status.rtt == expected.rtt) {
if (++currentReps == requiredReps) {
logger->debug("RTT offset: {:#010x}", status.offset_rtt);
logger->debug("RTT var offset: {:#010x}", status.offset_rtt_var);
logger->info("RTT offset: {:#010x}", status.offset_rtt);
logger->info("RTT var offset: {:#010x}", status.offset_rtt_var);
status.state = GUESS_STATE_READY;
} else {
// reload expected RTT
Expand Down
2 changes: 1 addition & 1 deletion version.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=1.1.10
version=1.1.11

0 comments on commit 575eef0

Please sign in to comment.