Commit 253491fb authored by Robert Ricci's avatar Robert Ricci

Add patch to deal with abs() issues

parent 6e7a43af
--- 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;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment