forked from esnet/iperf
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
diskfile_send() sent data capped at file-size
Issue: `diskfile_send()` unconditional call to `sp->snd2` would result in sending full buffer size everytime, regardless of the file size. Fix: The function updated to check for end-of-file (reading 0 bytes) and, 1. set `sp->pending_size` to appropriate data length available to be sent 2. check for end condition and avoid sending data more than file size. Note: The fix is only for the maximum cap on the data size sent on the network. If other parameters (-t, -n, etc.) yield smaller size or shorter time then needed, the file will still be partially sent to the network.
- Loading branch information
Showing
1 changed file
with
37 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters