[ovs-dev] [PATCH 4/7] ovsdb-tool: Fix logic for displaying server names in "check-cluster".

Ben Pfaff blp at ovn.org
Thu Jul 26 17:09:43 UTC 2018


Without this patch, server names are displayed as UUIDs even when we know
the file name; file names are easier for the user to read.

Signed-off-by: Ben Pfaff <blp at ovn.org>
---
 ovsdb/ovsdb-tool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ovsdb/ovsdb-tool.c b/ovsdb/ovsdb-tool.c
index 5f2eac413a5a..13df11014374 100644
--- a/ovsdb/ovsdb-tool.c
+++ b/ovsdb/ovsdb-tool.c
@@ -1052,7 +1052,7 @@ get_server_name(const struct cluster *c, const struct uuid *sid,
                 char buf[SID_LEN + 1], size_t bufsize)
 {
     for (size_t i = 0; i < c->n_servers; i++) {
-        struct server *s = &c->servers[c->n_servers];
+        struct server *s = &c->servers[i];
         if (uuid_equals(&s->header.sid, sid)) {
             return s->filename;
         }
-- 
2.16.1



More information about the dev mailing list