[netperf-dev] netperf2 commit notice r83 - in trunk: . src
raj at netperf.org
raj at netperf.org
Fri Nov 3 12:50:59 PST 2006
Author: raj
Date: 2006-11-03 12:50:58 -0800 (Fri, 03 Nov 2006)
New Revision: 83
Modified:
trunk/AUTHORS
trunk/Release_Notes
trunk/src/netlib.c
Log:
buffer fill fix from Steve
Modified: trunk/AUTHORS
===================================================================
--- trunk/AUTHORS 2006-10-16 22:20:52 UTC (rev 82)
+++ trunk/AUTHORS 2006-11-03 20:50:58 UTC (rev 83)
@@ -185,4 +185,7 @@
etc changes
Shilpi Agarwal
-Changes to allow UDP_STREAM to use connected sockets on both sides.
\ No newline at end of file
+Changes to allow UDP_STREAM to use connected sockets on both sides.
+
+Steve
+Fixes for buffer filling.
\ No newline at end of file
Modified: trunk/Release_Notes
===================================================================
--- trunk/Release_Notes 2006-10-16 22:20:52 UTC (rev 82)
+++ trunk/Release_Notes 2006-11-03 20:50:58 UTC (rev 83)
@@ -2,6 +2,9 @@
Things changed in this release:
+*) A bug fix for buffer filling from a file to properly advance the
+ buffer pointer when the file is smaller than the send buffer.
+
*) Enable certain UDP tests which previously used unconnected sockets
to use connected sockets. Courtesy of Shilpi Agarwal.
Modified: trunk/src/netlib.c
===================================================================
--- trunk/src/netlib.c 2006-10-16 22:20:52 UTC (rev 82)
+++ trunk/src/netlib.c 2006-11-03 20:50:58 UTC (rev 83)
@@ -1266,15 +1266,17 @@
temp_link->buffer_ptr += offset;
/* is where the buffer fill code goes. */
if (do_fill) {
+ char *bufptr = temp_link->buffer_ptr;
bytes_left = buffer_size;
while (bytes_left) {
- if (((bytes_read = (int)fread(temp_link->buffer_ptr,
- 1,
- bytes_left,
- fill_source)) == 0) &&
+ if (((bytes_read = (int)fread(bufptr,
+ 1,
+ bytes_left,
+ fill_source)) == 0) &&
(feof(fill_source))){
rewind(fill_source);
}
+ bufptr += bytes_read;
bytes_left -= bytes_read;
}
}
More information about the netperf-dev
mailing list