X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=client.c;h=8b230617f79bd0dbab6853e9388a1e7fa8f700ce;hp=84fc1f531009e39bae4ac5852b6a2eb32e247b9b;hb=515418094c61cf135513a34651af6134a8794b5d;hpb=6c424d93e52538ffad36dbf6f544b4ad9c441fb4 diff --git a/client.c b/client.c index 84fc1f53..8b230617 100644 --- a/client.c +++ b/client.c @@ -390,8 +390,6 @@ struct fio_client *fio_client_add_explicit(struct client_ops *ops, client = get_new_client(); - client->hostname = strdup(hostname); - if (type == Fio_client_socket) client->is_sock = true; else { @@ -410,6 +408,7 @@ struct fio_client *fio_client_add_explicit(struct client_ops *ops, client->ops = ops; client->refs = 1; client->type = ops->client_type; + client->hostname = strdup(hostname); __fio_client_add_cmd_option(client, "fio"); @@ -471,8 +470,10 @@ int fio_client_add(struct client_ops *ops, const char *hostname, void **cookie) &client->is_sock, &client->port, &client->addr.sin_addr, &client->addr6.sin6_addr, - &client->ipv6)) + &client->ipv6)) { + fio_put_client(client); return -1; + } client->fd = -1; client->ops = ops; @@ -1678,6 +1679,7 @@ static struct cmd_iolog_pdu *convert_iolog(struct fio_net_cmd *cmd, ret->log_type = le32_to_cpu(ret->log_type); ret->compressed = le32_to_cpu(ret->compressed); ret->log_offset = le32_to_cpu(ret->log_offset); + ret->log_prio = le32_to_cpu(ret->log_prio); ret->log_hist_coarseness = le32_to_cpu(ret->log_hist_coarseness); if (*store_direct) @@ -1695,6 +1697,7 @@ static struct cmd_iolog_pdu *convert_iolog(struct fio_net_cmd *cmd, s->data.val = le64_to_cpu(s->data.val); s->__ddir = __le32_to_cpu(s->__ddir); s->bs = le64_to_cpu(s->bs); + s->priority = le16_to_cpu(s->priority); if (ret->log_offset) { struct io_sample_offset *so = (void *) s;