Probe the current URI so that other places don't need to do that.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
tools/virt-admin.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/virt-admin.c b/tools/virt-admin.c
index 1e22a3c8a9..02cf421cee 100644
--- a/tools/virt-admin.c
+++ b/tools/virt-admin.c
@@ -120,6 +120,9 @@ vshAdmConnect(vshControl *ctl, unsigned int flags)
if (priv->wantReconnect)
vshPrint(ctl, "%s\n", _("Reconnected to the admin
server"));
+
+ if (!ctl->connname)
+ ctl->connname = virAdmConnectGetURI(priv->conn);
}
return 0;
--
2.43.0