- * Copyright (c) 2009, 2010, 2011, 2012 Nicira Networks.
+ * Copyright (c) 2009, 2010, 2011, 2012 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
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);
}