engines/net: use link close message on TCP as well
[fio.git] / client.c
index 5725fd12d87c38b8bef91daafe1afaf96265753d..1879e4478e5d6bcf1926c42b026b7176af195bb8 100644 (file)
--- a/client.c
+++ b/client.c
@@ -620,8 +620,9 @@ static int __fio_client_send_remote_ini(struct fio_client *client,
 
        dprint(FD_NET, "send remote ini %s to %s\n", filename, client->hostname);
 
-       p_size = sizeof(*pdu) + strlen(filename);
+       p_size = sizeof(*pdu) + strlen(filename) + 1;
        pdu = malloc(p_size);
+       memset(pdu, 0, p_size);
        pdu->name_len = strlen(filename);
        strcpy((char *) pdu->file, filename);
        pdu->client_type = cpu_to_le16((uint16_t) client->type);
@@ -830,6 +831,7 @@ static void convert_ts(struct thread_stat *dst, struct thread_stat *src)
        for (i = 0; i < DDIR_RWDIR_CNT; i++) {
                dst->total_io_u[i]      = le64_to_cpu(src->total_io_u[i]);
                dst->short_io_u[i]      = le64_to_cpu(src->short_io_u[i]);
+               dst->drop_io_u[i]       = le64_to_cpu(src->drop_io_u[i]);
        }
 
        dst->total_submit       = le64_to_cpu(src->total_submit);