X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ovsdb%2Fovsdb-client.c;h=7177b2614c9893e77d852a1f419f60bf2f11ab30;hb=c6f196a050aeae603f5d68ca065a72da9a8ec894;hp=a17c5aa863530ace1bcfcfd9171b7211f148d59f;hpb=766407ea9011d347d577a3409acb0f8d34cc72e1;p=openvswitch diff --git a/ovsdb/ovsdb-client.c b/ovsdb/ovsdb-client.c index a17c5aa8..7177b261 100644 --- a/ovsdb/ovsdb-client.c +++ b/ovsdb/ovsdb-client.c @@ -224,11 +224,11 @@ open_jsonrpc(const char *server) struct stream *stream; int error; - error = stream_open_block(stream_open(server, &stream), &stream); + error = stream_open_block(jsonrpc_stream_open(server, &stream), &stream); if (error == EAFNOSUPPORT) { struct pstream *pstream; - error = pstream_open(server, &pstream); + error = jsonrpc_pstream_open(server, &pstream); if (error) { ovs_fatal(error, "failed to connect or listen to \"%s\"", server); } @@ -917,14 +917,22 @@ do_monitor(int argc, char *argv[]) ovsdb_column_set_add(&columns, column); } } else { - struct shash_node *node; - - SHASH_FOR_EACH (node, &table->columns) { - const struct ovsdb_column *column = node->data; - if (column->index != OVSDB_COL_UUID) { + const struct shash_node **nodes; + size_t i, n; + + n = shash_count(&table->columns); + nodes = shash_sort(&table->columns); + for (i = 0; i < n; i++) { + const struct ovsdb_column *column = nodes[i]->data; + if (column->index != OVSDB_COL_UUID + && column->index != OVSDB_COL_VERSION) { ovsdb_column_set_add(&columns, column); } } + free(nodes); + + ovsdb_column_set_add(&columns, + ovsdb_table_schema_get_column(table, "_version")); } if (argc >= 6 && *argv[5] != '\0') {