X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ovsdb%2Fovsdb-server.c;h=06ac98be6b2326c4ca3e4bee4bce9cc5d20db4c8;hb=05b8f1c2b47a64d1eee5d3fa4ab325b0784c5003;hp=e2fb958528adba6e28798e576da1de49808a34ca;hpb=87fcbc60f28cde16939b3a9e139bdc67ca831010;p=openvswitch diff --git a/ovsdb/ovsdb-server.c b/ovsdb/ovsdb-server.c index e2fb9585..06ac98be 100644 --- a/ovsdb/ovsdb-server.c +++ b/ovsdb/ovsdb-server.c @@ -15,8 +15,7 @@ #include -#include "ovsdb.h" - +#include #include #include #include @@ -27,11 +26,13 @@ #include "daemon.h" #include "dirs.h" #include "file.h" +#include "hash.h" #include "json.h" #include "jsonrpc.h" #include "jsonrpc-server.h" #include "leak-checker.h" #include "list.h" +#include "ovsdb.h" #include "ovsdb-data.h" #include "ovsdb-types.h" #include "ovsdb-error.h" @@ -499,7 +500,25 @@ update_remote_row(const struct ovsdb_row *row, struct ovsdb_txn *txn, values[n++] = xstrdup(ovs_retval_to_string(status.last_error)); } + if (status.locks_held && status.locks_held[0]) { + keys[n] = xstrdup("locks_held"); + values[n++] = xstrdup(status.locks_held); + } + if (status.locks_waiting && status.locks_waiting[0]) { + keys[n] = xstrdup("locks_waiting"); + values[n++] = xstrdup(status.locks_waiting); + } + if (status.locks_lost && status.locks_lost[0]) { + keys[n] = xstrdup("locks_lost"); + values[n++] = xstrdup(status.locks_lost); + } + if (status.n_connections > 1) { + keys[n] = xstrdup("n_connections"); + values[n++] = xasprintf("%d", status.n_connections); + } write_string_string_column(rw_row, "status", keys, values, n); + + ovsdb_jsonrpc_server_free_remote_status(&status); } static void @@ -690,7 +709,7 @@ parse_options(int argc, char *argv[], char **file_namep, usage(); case 'V': - OVS_PRINT_VERSION(0, 0); + ovs_print_version(0, 0); exit(EXIT_SUCCESS); VLOG_OPTION_HANDLERS