summaryrefslogtreecommitdiff
path: root/src/tools/oping/oping_server.c
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri.staessens@ugent.be>2018-05-07 17:43:18 +0200
committerSander Vrijders <sander.vrijders@ugent.be>2018-05-07 17:55:07 +0200
commitf57748cace780875adb92a1bb61e0b12550e052d (patch)
treec1362db69c9eeac7039c5361f3de2f32137e4710 /src/tools/oping/oping_server.c
parente68f30878384b6c13ea0cc3bb6681504c66ff712 (diff)
downloadouroboros-f57748cace780875adb92a1bb61e0b12550e052d.tar.gz
ouroboros-f57748cace780875adb92a1bb61e0b12550e052d.zip
tools: Disable partial reads in oping
The oping tool was using a 1500 byte buffer, but didn't account for partial reads when sending 1500 byte packets. This disables the partial reads. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
Diffstat (limited to 'src/tools/oping/oping_server.c')
-rw-r--r--src/tools/oping/oping_server.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/tools/oping/oping_server.c b/src/tools/oping/oping_server.c
index 391da197..10926763 100644
--- a/src/tools/oping/oping_server.c
+++ b/src/tools/oping/oping_server.c
@@ -118,9 +118,9 @@ void * server_thread(void *o)
void * accept_thread(void * o)
{
- int fd;
+ int fd;
struct timespec now;
- qosspec_t qs;
+ qosspec_t qs;
(void) o;
@@ -142,7 +142,8 @@ void * accept_thread(void * o)
server.times[fd] = now;
pthread_mutex_unlock(&server.lock);
- fccntl(fd, FLOWSFLAGS, FLOWFRNOBLOCK | FLOWFRDWR);
+ fccntl(fd, FLOWSFLAGS,
+ FLOWFRNOBLOCK | FLOWFRDWR | FLOWFRNOPART);
}
return (void *) 0;