[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 2/2] qga: Use qemu_get_host_name() instead of g_get_host_n
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH v3 2/2] qga: Use qemu_get_host_name() instead of g_get_host_name() |
Date: |
Tue, 23 Jun 2020 09:50:43 +0100 |
User-agent: |
Mutt/1.14.0 (2020-05-02) |
On Mon, Jun 22, 2020 at 08:19:36PM +0200, Michal Privoznik wrote:
> Problem with g_get_host_name() is that on the first call it saves
> the hostname into a global variable and from then on, every
> subsequent call returns the saved hostname. Even if the hostname
> changes. This doesn't play nicely with guest agent, because if
> the hostname is acquired before the guest is set up (e.g. on the
> first boot, or before DHCP) we will report old, invalid hostname.
>
> Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1845127
>
> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
> ---
> qga/commands.c | 17 +++++++++++++----
> 1 file changed, 13 insertions(+), 4 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|