summaryrefslogtreecommitdiff
path: root/src/tools/oping
diff options
context:
space:
mode:
authordimitri staessens <[email protected]>2017-08-31 08:02:08 +0000
committerSander Vrijders <[email protected]>2017-08-31 08:02:08 +0000
commitfb4143175b2511cbc915b21ea86e08a3700539f7 (patch)
tree83972ccd8e3debe62f40afae50a3eb27476a0d40 /src/tools/oping
parent399164eff1c6d07056ec93e3afd4079611cf9c7b (diff)
parent4060efec26115dbb9e68da67bc482a12b4f80ea8 (diff)
downloadouroboros-fb4143175b2511cbc915b21ea86e08a3700539f7.tar.gz
ouroboros-fb4143175b2511cbc915b21ea86e08a3700539f7.zip
Merged in dstaesse/ouroboros/be-fccntl (pull request #583)
lib: Add fccntl configuration command
Diffstat (limited to 'src/tools/oping')
-rw-r--r--src/tools/oping/oping_client.c4
-rw-r--r--src/tools/oping/oping_server.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/oping/oping_client.c b/src/tools/oping/oping_client.c
index db0ef199..ca8c0e72 100644
--- a/src/tools/oping/oping_client.c
+++ b/src/tools/oping/oping_client.c
@@ -21,7 +21,7 @@
*/
#include <ouroboros/dev.h>
-#include <ouroboros/fcntl.h>
+#include <ouroboros/fccntl.h>
#include <ouroboros/time_utils.h>
#include <signal.h>
@@ -60,7 +60,7 @@ void * reader(void * o)
double ms = 0;
double d = 0;
- flow_set_timeout(fd, &timeout);
+ fccntl(fd, FLOWSRCVTIMEO, &timeout);
while (client.rcvd != client.count) {
msg_len = flow_read(fd, buf, OPING_BUF_SIZE);
diff --git a/src/tools/oping/oping_server.c b/src/tools/oping/oping_server.c
index 6a535caf..0371f90f 100644
--- a/src/tools/oping/oping_server.c
+++ b/src/tools/oping/oping_server.c
@@ -130,7 +130,7 @@ void * accept_thread(void * o)
server.times[fd] = now;
pthread_mutex_unlock(&server.lock);
- flow_set_flags(fd, FLOW_O_NONBLOCK | FLOW_O_RDWR);
+ fccntl(fd, FLOWSFLAGS, FLOWFNONBLOCK | FLOWFRDWR);
}
return (void *) 0;