}
}
if (found) {
- unixctl_command_reply(conn, 200, ds_cstr(&results));
+ unixctl_command_reply(conn, ds_cstr(&results));
} else {
- unixctl_command_reply(conn, 404, "");
+ unixctl_command_reply_error(conn, NULL);
}
ds_destroy(&results);
}
const char *argv[] OVS_UNUSED, void *aux OVS_UNUSED)
{
stress_enable(true);
- unixctl_command_reply(conn, 200, "");
+ unixctl_command_reply(conn, NULL);
}
static void
const char *argv[] OVS_UNUSED, void *aux OVS_UNUSED)
{
stress_enable(false);
- unixctl_command_reply(conn, 200, "");
+ unixctl_command_reply(conn, NULL);
}
static void
stress_unixctl_set(struct unixctl_conn *conn, int argc OVS_UNUSED,
const char *argv[], void *aux OVS_UNUSED)
{
- int code = 404;
const char *option_name = argv[1];
const char *option_val = argv[2];
int i;
bool random = !strcmp(argv[3], "random");
stress_set(option, period, random);
- code = 200;
- break;
+ unixctl_command_reply(conn, NULL);
+ return;
}
}
- unixctl_command_reply(conn, code, "");
+
+ unixctl_command_reply_error(conn, NULL);
}
/* Exposes ovs-appctl access to the stress options.