Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Robert Ricci
Evaluating Networked Systems
Commits
253491fb
Commit
253491fb
authored
Mar 02, 2015
by
Robert Ricci
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add patch to deal with abs() issues
parent
6e7a43af
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
patches/abs.patch
patches/abs.patch
+22
-0
No files found.
patches/abs.patch
0 → 100644
View file @
253491fb
--- remy-reproduce-1.0/ns-2.35/tcp/template.h 2013-07-18 23:50:47.000000000 -0600
+++ remy-reproduce-1.0.patched/ns-2.35/tcp/template.h 2015-02-26 10:59:35.540289651 -0700
@@ -84,7 +84,7 @@
template <class Type>
-inline Type abs(Type a)
+inline Type generic_abs(Type a)
{
return (a < 0) ? -a : a;
}
--- remy-reproduce-1.0/ns-2.35/sctp/sctp.cc 2013-07-18 23:50:46.000000000 -0600
+++ remy-reproduce-1.0.patched/ns-2.35/sctp/sctp.cc 2015-02-26 11:00:23.429284645 -0700
@@ -2308,7 +2308,7 @@
{
spDest->dRttVar
= ( (1 - RTO_BETA) * spDest->dRttVar
- + RTO_BETA * abs(spDest->dSrtt - dNewRtt) );
+ + RTO_BETA * generic_abs(spDest->dSrtt - dNewRtt) );
spDest->dSrtt
= (1 - RTO_ALPHA) * spDest->dSrtt + RTO_ALPHA * dNewRtt;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment