summaryrefslogtreecommitdiff
path: root/src/tools/operf/operf_client.c
diff options
context:
space:
mode:
authorDimitri Staessens <[email protected]>2020-03-14 17:52:06 +0100
committerSander Vrijders <[email protected]>2020-03-15 14:30:58 +0100
commit51d8f69fb152ae5a47151c2f132fd4263ec3d144 (patch)
tree67ef7b137bc00fdbb93774aa8ccbbbb39975ace0 /src/tools/operf/operf_client.c
parentb977090a7692acada4b81677e88c5a5e60a153c3 (diff)
downloadouroboros-0.17.0.tar.gz
ouroboros-0.17.0.zip
lib: Return number of written bytes on flow_write0.17.0
This is more in line with the write() system call and prepares for partial writes. Partial writes are disabled by default (and not yet implemented). Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
Diffstat (limited to 'src/tools/operf/operf_client.c')
-rw-r--r--src/tools/operf/operf_client.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/operf/operf_client.c b/src/tools/operf/operf_client.c
index 3b0ff2af..004a8965 100644
--- a/src/tools/operf/operf_client.c
+++ b/src/tools/operf/operf_client.c
@@ -141,7 +141,7 @@ void * writer(void * o)
msg->id = client.sent;
- if (flow_write(*fdp, buf, client.size) == -1) {
+ if (flow_write(*fdp, buf, client.size) < 0) {
printf("Failed to send packet.\n");
flow_dealloc(*fdp);
free(buf);
@@ -204,7 +204,7 @@ int client_main(void)
else
printf("Doing a unidirectional test.\n");
- if (flow_write(fd, &client.conf, sizeof(client.conf))) {
+ if (flow_write(fd, &client.conf, sizeof(client.conf)) < 0) {
printf("Failed to send configuration.\n");
flow_dealloc(fd);
return -1;