Skip to content

Commit 7f7149b

Browse files
committed
Made RetransmissionTrials configuration more readable.
1 parent 69a6cb0 commit 7f7149b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/control.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ static bool handleNetPerfMeterAddFlow(MessageReader* messageR
799799
trafficSpec.RepeatOnOff = (addFlowMsg->Header.Flags & NPMAFF_REPEATONOFF);
800800
trafficSpec.RetransmissionTrials = ntohl(addFlowMsg->RetransmissionTrials) & ~NPMAF_RTX_TRIALS_IN_MILLISECONDS;
801801
trafficSpec.RetransmissionTrialsInMS = (ntohl(addFlowMsg->RetransmissionTrials) & NPMAF_RTX_TRIALS_IN_MILLISECONDS);
802-
if( (trafficSpec.RetransmissionTrialsInMS) && (trafficSpec.RetransmissionTrials == 0x7fffffff) ) {
802+
if( (trafficSpec.RetransmissionTrialsInMS) && (trafficSpec.RetransmissionTrials == NPMAF_RTX_DEFAULT) ) {
803803
trafficSpec.RetransmissionTrials = ~0;
804804
}
805805

src/netperfmeterpackets.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ struct NetPerfMeterAddFlowMessage
131131
#define NPMAFF_REPEATONOFF (1 << 2)
132132

133133
// RetransmissionTrials in milliseconds (highest bit of 32-bit value set)
134-
#define NPMAF_RTX_TRIALS_IN_MILLISECONDS (1 << 31)
134+
#define NPMAF_RTX_TRIALS_IN_MILLISECONDS (1U << 31) // Use ms instead of number of trials
135+
#define NPMAF_RTX_DEFAULT 0x7fffffffU // Use protocol default
135136

136137
#define NPAF_PRIMARY_PATH 0x00
137138
#define NPAF_CMT 0x01

0 commit comments

Comments
 (0)