Increment open file count manually
[fio.git] / engines / net.c
index 8b85a88604bde109f86f4cf5864ab045560f3be1..fcf4b8984cd612d1a25d849f2e295ba3935222cf 100644 (file)
@@ -392,7 +392,7 @@ static int fio_netio_send(struct thread_data *td, struct io_u *io_u)
 
        do {
                if (is_udp(o)) {
-                       struct sockaddr *to;
+                       const struct sockaddr *to;
                        socklen_t len;
 
                        if (is_ipv6(o)) {
@@ -913,10 +913,10 @@ static int fio_netio_setup_connect_inet(struct thread_data *td,
 
        if (is_ipv6(o)) {
                af = AF_INET6;
-               dst = &nd->addr6;
+               dst = &nd->addr6.sin6_addr;
        } else {
                af = AF_INET;
-               dst = &nd->addr;
+               dst = &nd->addr.sin_addr;
        }
 
        if (fio_fill_addr(td, host, af, dst, &res))
@@ -1194,8 +1194,9 @@ static int fio_netio_setup(struct thread_data *td)
        struct netio_data *nd;
 
        if (!td->files_index) {
-               add_file(td, td->o.filename ?: "net", 0);
+               add_file(td, td->o.filename ?: "net", 0, 0);
                td->o.nr_files = td->o.nr_files ?: 1;
+               td->o.open_files++;
        }
 
        if (!td->io_ops->data) {