#include "fio.h"
#include "server.h"
#include "crc/crc16.h"
-#include "ieee754.h"
+#include "lib/ieee754.h"
#include "fio_version.h"
static char *fio_server_arg;
static char *bind_sock;
static struct sockaddr_in saddr_in;
+static int first_cmd_check;
static const char *fio_server_ops[FIO_NET_CMD_NR] = {
"",
"START",
"STOP",
"DISK_UTIL",
+ "RUN",
};
const char *fio_server_op(unsigned int op)
if (first)
memcpy(cmdret, &cmd, sizeof(cmd));
- else
- assert(cmdret->opcode == cmd.opcode);
+ else if (cmdret->opcode != cmd.opcode) {
+ log_err("fio: fragment opcode mismatch (%d != %d)\n",
+ cmdret->opcode, cmd.opcode);
+ ret = 1;
+ break;
+ }
if (!cmd.pdu_len)
break;
void fio_server_idle_loop(void)
{
+ if (!first_cmd_check)
+ fio_net_send_simple_cmd(server_fd, FIO_NET_CMD_RUN, 0, NULL);
if (server_fd != -1)
handle_connection(server_fd, 0);
}