static void usage(void) NO_RETURN;
static void parse_options(int argc, char *argv[]);
static struct jsonrpc *open_jsonrpc(const char *server);
static void usage(void) NO_RETURN;
static void parse_options(int argc, char *argv[]);
static struct jsonrpc *open_jsonrpc(const char *server);
- } else if (sset_count(&dbs) == 1) {
- database = xstrdup(SSET_FIRST(&dbs));
- } else if (sset_contains(&dbs, "Open_vSwitch")) {
+ } else if (dbs.n == 1) {
+ database = xstrdup(dbs.names[0]);
+ } else if (svec_contains(&dbs, "Open_vSwitch")) {
database = "Open_vSwitch";
} else {
ovs_fatal(0, "no default database for `%s' command, please "
"specify a database name", command->name);
}
database = "Open_vSwitch";
} else {
ovs_fatal(0, "no default database for `%s' command, please "
"specify a database name", command->name);
}
if (name->type != JSON_STRING) {
ovs_fatal(0, "list_dbs response %zu is not string", i);
}
if (name->type != JSON_STRING) {
ovs_fatal(0, "list_dbs response %zu is not string", i);
}