server: properly reset state_number in fio_reset_state()
authorJens Axboe <axboe@kernel.dk>
Thu, 15 Nov 2012 14:52:13 +0000 (07:52 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 15 Nov 2012 14:52:13 +0000 (07:52 -0700)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
libfio.c
server.c

index f680be8..b48d7c2 100644 (file)
--- a/libfio.c
+++ b/libfio.c
@@ -135,6 +135,7 @@ void reset_fio_state(void)
 {
        groupid = 0;
        thread_number = 0;
+       stat_number = 0;
        done_secs = 0;
 }
 
index 6447591..8d7f9b7 100644 (file)
--- a/server.c
+++ b/server.c
@@ -561,8 +561,6 @@ static int handle_job_cmd(struct fio_net_cmd *cmd)
        pdu->buf_len = le32_to_cpu(pdu->buf_len);
        pdu->client_type = le32_to_cpu(pdu->client_type);
 
-       stat_number = 0;
-
        if (parse_jobs_ini(buf, 1, 0, pdu->client_type)) {
                fio_net_send_quit(server_fd);
                return -1;
@@ -600,8 +598,6 @@ static int handle_jobline_cmd(struct fio_net_cmd *cmd)
                dprint(FD_NET, "server: %d: %s\n", i, argv[i]);
        }
 
-       stat_number = 0;
-
        if (parse_cmd_line(clp->lines, argv, clp->client_type)) {
                fio_net_send_quit(server_fd);
                free(argv);