vshAdmConnect: Preserve connection URI in ctl->connname if auto-detected

Probe the current URI so that other places don't need to do that.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Peter Krempa committed 2024-01-15 14:05:20 +01:00
1 parent 4763f62a96
commit 6f956696cb
1 file changed
+3
+3
View File
@@ -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;