Skip to Content.
Sympa Menu

ndt-dev - [ndt-dev] [ndt] r744 committed - Fix errors in function parameters and casts leading to wrong results

Subject: NDT-DEV email list created

List archive

[ndt-dev] [ndt] r744 committed - Fix errors in function parameters and casts leading to wrong results


Chronological Thread 
  • From:
  • To:
  • Subject: [ndt-dev] [ndt] r744 committed - Fix errors in function parameters and casts leading to wrong results
  • Date: Sun, 30 Oct 2011 15:30:54 +0000

Revision: 744
Author:

Date: Sun Oct 30 08:30:19 2011
Log: Fix errors in function parameters and casts leading to wrong results
http://code.google.com/p/ndt/source/detail?r=744

Modified:
/branches/kkumar_code_organize/src/heuristics.c
/branches/kkumar_code_organize/src/web100-util.c
/branches/kkumar_code_organize/src/web100srv.c

=======================================
--- /branches/kkumar_code_organize/src/heuristics.c Fri Oct 21 14:32:05
2011
+++ /branches/kkumar_code_organize/src/heuristics.c Sun Oct 30 08:30:19
2011
@@ -226,9 +226,9 @@
if ((*RcvWinScale > WINDOW_SCALE_THRESH) || (MaxRwinRcvd <
MAX_TCP_PORT))
*RcvWinScale = 0;

- *rwin = (double) (MaxRwinRcvd * BITS_8 / KILO_BITS / KILO_BITS );
+ *rwin = (double) MaxRwinRcvd * BITS_8 / KILO_BITS / KILO_BITS;
*swin = (double) SendBuf * BITS_8 / KILO_BITS / KILO_BITS;
- *cwin = (double) (MaxCwnd * BITS_8 / KILO_BITS / KILO_BITS );
+ *cwin = (double) MaxCwnd * BITS_8 / KILO_BITS / KILO_BITS;
log_println(
log_lvl_heur,
"--window sizes: SndWinScale= %d, RcvwinScale=%d, rwin=%f, swin=%f, cwin=%f",
=======================================
--- /branches/kkumar_code_organize/src/web100-util.c Fri Oct 28 19:23:28 2011
+++ /branches/kkumar_code_organize/src/web100-util.c Sun Oct 30 08:30:19 2011
@@ -149,11 +149,12 @@
if (strcmp(line, "4294967295;") == 0)
sprintf(line, "%d;", -1);

- strlcat(results, line, sizeof(results));
+ //strlcat(results, line, sizeof(results));
+ strlcat(results, line, (BUFFSIZE + 1));
log_print(3, "%s", line);
}
log_println(3, "");
- log_println(0, "Sending %d Byte packets over the network",
currentMSSval);
+ log_println(0, "Sending %d Byte packets over the network, and data=%s", currentMSSval, line);

/* The initial check has been completed, now stream data to the remote client
* for 5 seconds with very limited buffer space. The idea is to see if there
=======================================
--- /branches/kkumar_code_organize/src/web100srv.c Fri Oct 28 08:06:41
2011
+++ /branches/kkumar_code_organize/src/web100srv.c Sun Oct 30 08:30:19
2011
@@ -1172,8 +1172,8 @@
packetloss_s2c);

//get window sizes
- calc_window_sizes(&SndWinScale, &RcvWinScale, &Sndbuf, &MaxRwinRcvd,
- &MaxCwnd, &rwin, &swin, &cwin);
+ calc_window_sizes(&SndWinScale, &RcvWinScale, Sndbuf, MaxRwinRcvd,
+ MaxCwnd, &rwin, &swin, &cwin);

// Total test time
totaltime = calc_totaltesttime(SndLimTimeRwin, SndLimTimeCwnd,


  • [ndt-dev] [ndt] r744 committed - Fix errors in function parameters and casts leading to wrong results, ndt, 10/30/2011

Archive powered by MHonArc 2.6.16.

Top of Page