mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 09:17:52 +03:00
openvzDomainMigratePrepare3Params: correctly use hostname
In case no uri_in was supplied, we forgot to set the hostname
to the current hostname and formatted a useless uri_out.
src/util/glibcompat.h:57:26: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
57 | # define g_strdup_printf vir_g_strdup_printf
src/openvz/openvz_driver.c:2136:16: note: in expansion of macro ‘g_strdup_printf’
2136 | *uri_out = g_strdup_printf("ssh://%s", hostname);
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reported-by: Jaroslav Suchanek <jsuchane@redhat.com>
Fixes: e3c626a61d
Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
parent
d9096ce998
commit
f070334425
@ -2113,6 +2113,8 @@ openvzDomainMigratePrepare3Params(virConnectPtr dconn,
|
||||
" but migration requires an FQDN"));
|
||||
goto error;
|
||||
}
|
||||
|
||||
hostname = my_hostname;
|
||||
} else {
|
||||
uri = virURIParse(uri_in);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user