Rate must always calculate bytes done
[fio.git] / engines / net.c
index 55b2128e8b3f8c1fdc26fea9a0c331762a81e7be..60a68778b18458d9c49a758833911e779f2b7f99 100644 (file)
@@ -223,7 +223,7 @@ static int fio_netio_setup(struct thread_data *td)
                return 1;
        }
 
-       if (td->iomix) {
+       if (td_rw(td)) {
                log_err("fio: network connections must be read OR write\n");
                return 1;
        }
@@ -241,7 +241,7 @@ static int fio_netio_setup(struct thread_data *td)
        strcpy(host, buf);
        port = atoi(sep);
 
-       if (td->ddir == DDIR_READ) {
+       if (td_read(td)) {
                send_to_net(td) = 0;
                ret = fio_netio_setup_listen(td, port);
        } else {