projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ovsdb: Change the way connection duration time is reported in Manager table.
[openvswitch]
/
ovsdb
/
ovsdb-server.c
diff --git
a/ovsdb/ovsdb-server.c
b/ovsdb/ovsdb-server.c
index 1dc9b7def3bbc19538826ba8324e83429bf20f52..9eb58ebf1fd758826fc98a67156912681a88e5cb 100644
(file)
--- a/
ovsdb/ovsdb-server.c
+++ b/
ovsdb/ovsdb-server.c
@@
-171,7
+171,7
@@
main(int argc, char *argv[])
}
ovsdb_jsonrpc_server_destroy(jsonrpc);
ovsdb_destroy(db);
}
ovsdb_jsonrpc_server_destroy(jsonrpc);
ovsdb_destroy(db);
- shash_destroy(&remotes);
+ shash_destroy
_free_data
(&remotes);
unixctl_server_destroy(unixctl);
if (run_process && process_exited(run_process)) {
unixctl_server_destroy(unixctl);
if (run_process && process_exited(run_process)) {
@@
-242,8
+242,7
@@
parse_db_string_column(const struct ovsdb *db,
*tablep = table;
}
*tablep = table;
}
-#if HAVE_OPENSSL
-static const char *
+static OVS_UNUSED const char *
query_db_string(const struct ovsdb *db, const char *name)
{
if (!name || strncmp(name, "db:", 3)) {
query_db_string(const struct ovsdb *db, const char *name)
{
if (!name || strncmp(name, "db:", 3)) {
@@
-269,7
+268,6
@@
query_db_string(const struct ovsdb *db, const char *name)
return NULL;
}
}
return NULL;
}
}
-#endif /* HAVE_OPENSSL */
static struct ovsdb_jsonrpc_options *
add_remote(struct shash *remotes, const char *target)
static struct ovsdb_jsonrpc_options *
add_remote(struct shash *remotes, const char *target)
@@
-497,8
+495,9
@@
update_remote_row(const struct ovsdb_row *row, struct ovsdb_txn *txn,
keys[n] = xstrdup("state");
values[n++] = xstrdup(status->state);
keys[n] = xstrdup("state");
values[n++] = xstrdup(status->state);
- keys[n] = xstrdup("time_in_state");
- values[n++] = xasprintf("%u", status->state_elapsed);
+ keys[n] = xstrdup(status->is_connected ? "time_connected"
+ : "time_disconnected");
+ values[n++] = xasprintf("%u", status->conn_secs);
if (status->last_error) {
keys[n] = xstrdup("last_error");
values[n++] =
if (status->last_error) {
keys[n] = xstrdup("last_error");
values[n++] =
@@
-595,7
+594,7
@@
reconfigure_from_db(struct ovsdb_jsonrpc_server *jsonrpc,
}
}
ovsdb_jsonrpc_server_set_remotes(jsonrpc, &resolved_remotes);
}
}
ovsdb_jsonrpc_server_set_remotes(jsonrpc, &resolved_remotes);
- shash_destroy(&resolved_remotes);
+ shash_destroy
_free_data
(&resolved_remotes);
#if HAVE_OPENSSL
/* Configure SSL. */
#if HAVE_OPENSSL
/* Configure SSL. */